[cairo] Quartz backend fix

Chris Wilson chris at chris-wilson.co.uk
Mon Aug 10 09:44:50 PDT 2009


On Mon, 2009-08-10 at 18:19 +0200, Andrea Canciani wrote:
@@ -1547,9 +1547,6 @@ _cairo_quartz_surface_snapshot (void
*abstract_surface)
     cairo_quartz_surface_t *surface = abstract_surface;
     cairo_image_surface_t *image;
 
-    if (surface->imageSurfaceEquiv)
-       return NULL;
-

This should be valid, returning NULL here should cause
_cairo_surface_snapshot() (ignoring the bug there!) to use the fallback
implementation which in this case will take a copy of the image surface.
By not returning NULL here we actually just return a reference to the
mutable imageSurfaceEquiv instead of returning a copy.

(Pushed the other two chunks - thanks!)
-ickle



More information about the cairo mailing list