xcb: Fallback to image if allocating SHM fails

This turns an !!!ERROR!!! for scale-offset-similar with xcb-fallback into a
failed test and might fix other problems. However, since the problem here partly
is a race, those other problems might only be hit sometimes.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2011-08-08 22:35:20 +02:00
parent 2f020c4ade
commit 0da3d3efd2

View file

@ -188,7 +188,7 @@ _cairo_xcb_surface_create_similar_image (void *abstract_other,
stride * height,
&shm_info);
if (unlikely (status))
return _cairo_surface_create_in_error (status);
return cairo_image_surface_create (format, width, height);
image = _cairo_image_surface_create_with_pixman_format (shm_info->mem,
pixman_format,