diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-29 02:49:26 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-29 02:49:26 +0000 |
commit | 30e950515171b25d9bc3da8d535cfe05d8be69c8 (patch) | |
tree | 1d81bc7eb4a698c819f24554e629f1c1132ab36d | |
parent | 1d1af825bb4fcfd7c4a54b65292734ba244e096d (diff) |
xlib/shm: Skip creating new SHM segments if the data is already in the xserver
If the image is already inside a SHM segment, but the image format does
not match the surface, fallback to the XRender paths in order to perform
colorspace conversion on the data already inside the Xserver.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/cairo-xlib-render-compositor.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairo-xlib-render-compositor.c b/src/cairo-xlib-render-compositor.c index 94abe9ee..10360dbe 100644 --- a/src/cairo-xlib-render-compositor.c +++ b/src/cairo-xlib-render-compositor.c @@ -251,6 +251,10 @@ draw_image_boxes (void *_dst, int i; if (image->base.device == dst->base.device && + image->depth != dst->depth) + return CAIRO_INT_STATUS_UNSUPPORTED; + + 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); |