diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-17 23:37:31 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-18 00:06:06 +0100 |
commit | 3da2d8a1e277ae76ea2ba2533850b1901c6b3b29 (patch) | |
tree | 15b46992fdf0d578b869efe83a0acd03d7fa4c57 /src/cairo-xlib-render-compositor.c | |
parent | 94815189a42e52a82c602e8f23e69e1826f51ce7 (diff) | |
download | cairo-3da2d8a1e277ae76ea2ba2533850b1901c6b3b29.tar.gz |
xlib: Only use CopyArea if the ShmPixmap and destination are the same depth
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-xlib-render-compositor.c')
-rw-r--r-- | src/cairo-xlib-render-compositor.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cairo-xlib-render-compositor.c b/src/cairo-xlib-render-compositor.c index 02cd6a67d..8baeaf323 100644 --- a/src/cairo-xlib-render-compositor.c +++ b/src/cairo-xlib-render-compositor.c @@ -138,6 +138,8 @@ copy_image_boxes (void *_dst, GC gc; int i, j; + assert (image->depth == dst->depth); + status = acquire (dst); if (unlikely (status)) return status; @@ -240,6 +242,7 @@ draw_image_boxes (void *_dst, int i; if (image->base.device == dst->base.device && + image->depth == dst->depth && _cairo_xlib_shm_surface_get_pixmap (&image->base)) return copy_image_boxes (dst, image, boxes, dx, dy); @@ -287,7 +290,8 @@ draw_image_boxes (void *_dst, return CAIRO_INT_STATUS_NOTHING_TO_DO; } - if (((cairo_xlib_display_t *)dst->display)->shm) { + if (image->depth == dst->depth && + ((cairo_xlib_display_t *)dst->display)->shm) { cairo_box_t extents; cairo_rectangle_int_t r; |