From da62cc21da4f250850050d0ead947858fb804223 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 12 Oct 2010 21:59:14 +0200 Subject: [PATCH] _cairo_xcb_surface_picture: Check for fallback If a cairo surface's fallback member is set, the current content of that surface is in-memory and the X server has an outdated version of stuff. Our optimizations for doing in-server copies are wrong in this case and we should do stuff in cairo instead of the X server. Signed-off-by: Uli Schlachter Signed-off-by: Chris Wilson --- src/cairo-xcb-surface-render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c index 40682c0f0..afc812e07 100644 --- a/src/cairo-xcb-surface-render.c +++ b/src/cairo-xcb-surface-render.c @@ -1178,7 +1178,7 @@ _cairo_xcb_surface_picture (cairo_xcb_surface_t *target, picture = NULL; } - if (source->type == CAIRO_SURFACE_TYPE_XCB) + if (source->type == CAIRO_SURFACE_TYPE_XCB && ((cairo_xcb_surface_t *) source)->fallback == NULL) { if (source->backend->type == CAIRO_SURFACE_TYPE_XCB) { if (((cairo_xcb_surface_t *) source)->screen == target->screen) { @@ -1224,7 +1224,7 @@ _cairo_xcb_surface_picture (cairo_xcb_surface_t *target, } } #if CAIRO_HAS_XLIB_XCB_FUNCTIONS - else if (source->type == CAIRO_SURFACE_TYPE_XLIB) + else if (source->type == CAIRO_SURFACE_TYPE_XLIB && ((cairo_xlib_xcb_surface_t *) source)->xcb->fallback == NULL) { if (source->backend->type == CAIRO_SURFACE_TYPE_XLIB) { if (((cairo_xlib_xcb_surface_t *) source)->xcb->screen == target->screen) {