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>
This commit is contained in:
Chris Wilson 2013-01-29 02:49:26 +00:00
parent 1d1af825bb
commit 30e9505151

View file

@ -250,6 +250,10 @@ draw_image_boxes (void *_dst,
cairo_int_status_t status;
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))