Skip to content

Commit

Permalink
_cairo_xcb_surface_picture: Check for fallback
Browse files Browse the repository at this point in the history
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 <psychon@znc.in>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Uli Schlachter authored and Chris Wilson committed Oct 13, 2010
1 parent 5a0f8f7 commit da62cc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cairo-xcb-surface-render.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit da62cc2

Please sign in to comment.