[cairo-commit] src/cairo-xlib-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Sep 13 08:50:19 PDT 2012


 src/cairo-xlib-surface.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 69d97d97bea86e7f4223d857803fb7f0ec0d369f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Sep 13 16:45:46 2012 +0100

    xlib: Force the fallback flush before updating the external Drawable
    
    _cairo_surface_begin_modification() performs an internal flush, for
    which the xlib backend skips flushing the fallback surface as it will
    continue to use it for the subsequent operation. In the case where we
    are flushing prior to updating the Drawable, we need to perform an
    external flush which will trigger the posting of the damage from the
    fallback surface.
    
    Reported-by: Weng Xuetian <wengxt at gmail.com>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=54657
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 4d1ef90..dd9fc11 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -2067,7 +2067,7 @@ cairo_xlib_surface_set_size (cairo_surface_t *abstract_surface,
 	return;
     }
 
-    status = _cairo_surface_begin_modification (abstract_surface);
+    status = _cairo_xlib_surface_flush (abstract_surface, 0);
     if (unlikely (status)) {
 	_cairo_surface_set_error (abstract_surface, status);
 	return;
@@ -2128,7 +2128,7 @@ cairo_xlib_surface_set_drawable (cairo_surface_t   *abstract_surface,
     if (surface->owns_pixmap)
 	return;
 
-    status = _cairo_surface_begin_modification (abstract_surface);
+    status = _cairo_xlib_surface_flush (abstract_surface, 0);
     if (unlikely (status)) {
 	_cairo_surface_set_error (abstract_surface, status);
 	return;


More information about the cairo-commit mailing list