[cairo-commit] src/cairo-xcb-surface-render.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Tue Nov 23 13:42:31 PST 2010


 src/cairo-xcb-surface-render.c |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 520206e99122f8b5c0440640afc1b35e14030a80
Author: Uli Schlachter <psychon at znc.in>
Date:   Sun Oct 31 18:26:59 2010 +0100

    xcb: Handle deferred_clear in _copy_to_picture
    
    This ensures that surfaces with the deferred_clear flag on are cleared
    before being used as sources.
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 83689e5..1ec63ca 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -1113,6 +1113,12 @@ _copy_to_picture (cairo_xcb_surface_t *source,
     cairo_xcb_picture_t *picture;
     uint32_t values[] = { 0, 1 };
 
+    if (source->deferred_clear) {
+	cairo_status_t status = _cairo_xcb_surface_clear (source);
+	if (unlikely (status))
+	    return (cairo_xcb_picture_t *) _cairo_surface_create_in_error (status);
+    }
+
     /* XXX two level device locking, ensure we release the xcb device mutex? */
     if (source->drm != NULL)
 	cairo_surface_flush (source->drm);


More information about the cairo-commit mailing list