michael@0: # HG changeset patch michael@0: # User Matt Woodrow michael@0: # Date 1314162877 -43200 michael@0: # Node ID 87458c4670dcd16be5a5715d741ee2ca4cf18d0f michael@0: # Parent 95eb700a64591cda694c284a9f8ad08c11e3dd97 michael@0: Bug 675837 - Only flush Quartz surfaces on the success paths during cairo_quartz_get_image. r=roc michael@0: michael@0: diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c michael@0: --- a/gfx/cairo/cairo/src/cairo-quartz-surface.c michael@0: +++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c michael@0: @@ -1909,30 +1909,30 @@ _cairo_quartz_get_image (cairo_quartz_su michael@0: unsigned char *imageData; michael@0: cairo_image_surface_t *isurf; michael@0: michael@0: if (IS_EMPTY(surface)) { michael@0: *image_out = (cairo_image_surface_t*) cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0); michael@0: return CAIRO_STATUS_SUCCESS; michael@0: } michael@0: michael@0: - CGContextFlush(surface->cgContext); michael@0: - michael@0: if (surface->imageSurfaceEquiv) { michael@0: + CGContextFlush(surface->cgContext); michael@0: *image_out = (cairo_image_surface_t*) cairo_surface_reference(surface->imageSurfaceEquiv); michael@0: return CAIRO_STATUS_SUCCESS; michael@0: } michael@0: michael@0: if (_cairo_quartz_is_cgcontext_bitmap_context(surface->cgContext)) { michael@0: unsigned int stride; michael@0: unsigned int bitinfo; michael@0: unsigned int bpc, bpp; michael@0: CGColorSpaceRef colorspace; michael@0: unsigned int color_comps; michael@0: michael@0: + CGContextFlush(surface->cgContext); michael@0: imageData = (unsigned char *) CGBitmapContextGetData(surface->cgContext); michael@0: michael@0: #ifdef USE_10_3_WORKAROUNDS michael@0: bitinfo = CGBitmapContextGetAlphaInfo (surface->cgContext); michael@0: #else michael@0: bitinfo = CGBitmapContextGetBitmapInfo (surface->cgContext); michael@0: #endif michael@0: stride = CGBitmapContextGetBytesPerRow (surface->cgContext);