1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/cairo/quartz-cg-layers-fix-fallback.patch Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 1.4 +Bug 572912. Fix surface type passed to cairo_quartz_surface_create during fallback for CGLayers. r=jrmuizel 1.5 + 1.6 +diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c 1.7 +--- a/gfx/cairo/cairo/src/cairo-quartz-surface.c 1.8 ++++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c 1.9 +@@ -2026,17 +2026,17 @@ _cairo_quartz_surface_acquire_image (voi 1.10 + 1.11 + /* ND((stderr, "%p _cairo_quartz_surface_acquire_image\n", surface)); */ 1.12 + 1.13 + status = _cairo_quartz_get_image (surface, image_out); 1.14 + 1.15 + if (status == CAIRO_INT_STATUS_UNSUPPORTED && surface->cgLayer) { 1.16 + /* copy the layer into a Quartz bitmap context so we can get the data */ 1.17 + cairo_surface_t *tmp = 1.18 +- cairo_quartz_surface_create (CAIRO_CONTENT_COLOR_ALPHA, 1.19 ++ cairo_quartz_surface_create (CAIRO_FORMAT_ARGB32, 1.20 + surface->extents.width, 1.21 + surface->extents.height); 1.22 + cairo_quartz_surface_t *tmp_surface = (cairo_quartz_surface_t *) tmp; 1.23 + 1.24 + /* if surface creation failed, we won't have a Quartz surface here */ 1.25 + if (cairo_surface_get_type (tmp) == CAIRO_SURFACE_TYPE_QUARTZ && 1.26 + tmp_surface->imageSurfaceEquiv) { 1.27 + CGContextSaveGState (tmp_surface->cgContext); 1.28 +@@ -2049,16 +2049,17 @@ _cairo_quartz_surface_acquire_image (voi 1.29 + CGContextDrawLayerAtPoint (tmp_surface->cgContext, 1.30 + CGPointMake (0.0, 0.0), 1.31 + surface->cgLayer); 1.32 + CGContextRestoreGState (tmp_surface->cgContext); 1.33 + 1.34 + *image_out = (cairo_image_surface_t*) 1.35 + cairo_surface_reference(tmp_surface->imageSurfaceEquiv); 1.36 + *image_extra = tmp; 1.37 ++ status = CAIRO_STATUS_SUCCESS; 1.38 + } else { 1.39 + cairo_surface_destroy (tmp); 1.40 + } 1.41 + } 1.42 + 1.43 + if (status) 1.44 + return _cairo_error (CAIRO_STATUS_NO_MEMORY); 1.45 +