Index: gfx/cairo/cairo/src/cairo-xlib-surface.c =================================================================== RCS file: /cvsroot/mozilla/gfx/cairo/cairo/src/cairo-xlib-surface.c,v retrieving revision 1.43 diff -u -p -U 8 -r1.43 cairo-xlib-surface.c --- gfx/cairo/cairo/src/cairo-xlib-surface.c 8 Apr 2008 20:11:21 -0000 1.43 +++ gfx/cairo/cairo/src/cairo-xlib-surface.c 30 Jun 2008 00:33:12 -0000 @@ -1237,17 +1237,19 @@ _surfaces_compatible (cairo_xlib_surface if (!_cairo_xlib_surface_same_screen (dst, src)) return FALSE; /* same depth (for core) */ if (src->depth != dst->depth) return FALSE; /* if Render is supported, match picture formats */ - if (src->xrender_format != NULL && src->xrender_format == dst->xrender_format) + if (src->xrender_format != dst->xrender_format) + return FALSE; + else if (src->xrender_format != NULL) return TRUE; /* Without Render, match visuals instead */ if (src->visual == dst->visual) return TRUE; return FALSE; } Index: gfx/cairo/cairo/src/cairo-xcb-surface.c =================================================================== RCS file: /cvsroot/mozilla/gfx/cairo/cairo/src/cairo-xcb-surface.c,v retrieving revision 1.26 diff -u -p -U 8 -r1.26 cairo-xcb-surface.c --- gfx/cairo/cairo/src/cairo-xcb-surface.c 14 Feb 2008 06:54:27 -0000 1.26 +++ gfx/cairo/cairo/src/cairo-xcb-surface.c 30 Jun 2008 00:33:12 -0000 @@ -874,17 +874,19 @@ _surfaces_compatible (cairo_xcb_surface_ if (!_cairo_xcb_surface_same_screen (dst, src)) return FALSE; /* same depth (for core) */ if (src->depth != dst->depth) return FALSE; /* if Render is supported, match picture formats */ - if (src->xrender_format.id != XCB_NONE && src->xrender_format.id == dst->xrender_format.id) + if (src->xrender_format.id != dst->xrender_format.id) + return FALSE; + else if (src->xrender_format.id != XCB_NONE) return TRUE; /* Without Render, match visuals instead */ if (src->visual == dst->visual) return TRUE; return FALSE; }