2 # User Matt Woodrow <mwoodrow@mozilla.com>
3 # Date 1314162877 -43200
4 # Node ID 87458c4670dcd16be5a5715d741ee2ca4cf18d0f
5 # Parent 95eb700a64591cda694c284a9f8ad08c11e3dd97
6 Bug 675837 - Only flush Quartz surfaces on the success paths during cairo_quartz_get_image. r=roc
8 diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
9 --- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
10 +++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
11 @@ -1909,30 +1909,30 @@ _cairo_quartz_get_image (cairo_quartz_su
12 unsigned char *imageData;
13 cairo_image_surface_t *isurf;
15 if (IS_EMPTY(surface)) {
16 *image_out = (cairo_image_surface_t*) cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0);
17 return CAIRO_STATUS_SUCCESS;
20 - CGContextFlush(surface->cgContext);
22 if (surface->imageSurfaceEquiv) {
23 + CGContextFlush(surface->cgContext);
24 *image_out = (cairo_image_surface_t*) cairo_surface_reference(surface->imageSurfaceEquiv);
25 return CAIRO_STATUS_SUCCESS;
28 if (_cairo_quartz_is_cgcontext_bitmap_context(surface->cgContext)) {
31 unsigned int bpc, bpp;
32 CGColorSpaceRef colorspace;
33 unsigned int color_comps;
35 + CGContextFlush(surface->cgContext);
36 imageData = (unsigned char *) CGBitmapContextGetData(surface->cgContext);
38 #ifdef USE_10_3_WORKAROUNDS
39 bitinfo = CGBitmapContextGetAlphaInfo (surface->cgContext);
41 bitinfo = CGBitmapContextGetBitmapInfo (surface->cgContext);
43 stride = CGBitmapContextGetBytesPerRow (surface->cgContext);