1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/cairo/quartz-get-image-performance.patch Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 +# HG changeset patch 1.5 +# User Matt Woodrow <mwoodrow@mozilla.com> 1.6 +# Date 1314162877 -43200 1.7 +# Node ID 87458c4670dcd16be5a5715d741ee2ca4cf18d0f 1.8 +# Parent 95eb700a64591cda694c284a9f8ad08c11e3dd97 1.9 +Bug 675837 - Only flush Quartz surfaces on the success paths during cairo_quartz_get_image. r=roc 1.10 + 1.11 +diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c 1.12 +--- a/gfx/cairo/cairo/src/cairo-quartz-surface.c 1.13 ++++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c 1.14 +@@ -1909,30 +1909,30 @@ _cairo_quartz_get_image (cairo_quartz_su 1.15 + unsigned char *imageData; 1.16 + cairo_image_surface_t *isurf; 1.17 + 1.18 + if (IS_EMPTY(surface)) { 1.19 + *image_out = (cairo_image_surface_t*) cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0); 1.20 + return CAIRO_STATUS_SUCCESS; 1.21 + } 1.22 + 1.23 +- CGContextFlush(surface->cgContext); 1.24 +- 1.25 + if (surface->imageSurfaceEquiv) { 1.26 ++ CGContextFlush(surface->cgContext); 1.27 + *image_out = (cairo_image_surface_t*) cairo_surface_reference(surface->imageSurfaceEquiv); 1.28 + return CAIRO_STATUS_SUCCESS; 1.29 + } 1.30 + 1.31 + if (_cairo_quartz_is_cgcontext_bitmap_context(surface->cgContext)) { 1.32 + unsigned int stride; 1.33 + unsigned int bitinfo; 1.34 + unsigned int bpc, bpp; 1.35 + CGColorSpaceRef colorspace; 1.36 + unsigned int color_comps; 1.37 + 1.38 ++ CGContextFlush(surface->cgContext); 1.39 + imageData = (unsigned char *) CGBitmapContextGetData(surface->cgContext); 1.40 + 1.41 + #ifdef USE_10_3_WORKAROUNDS 1.42 + bitinfo = CGBitmapContextGetAlphaInfo (surface->cgContext); 1.43 + #else 1.44 + bitinfo = CGBitmapContextGetBitmapInfo (surface->cgContext); 1.45 + #endif 1.46 + stride = CGBitmapContextGetBytesPerRow (surface->cgContext);