Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | changeset: 42958:dd0f1f0a96b3 |
michael@0 | 2 | user: Robert O'Callahan <robert@ocallahan.org> |
michael@0 | 3 | date: Tue Jun 01 11:33:05 2010 +1200 |
michael@0 | 4 | summary: Bug 568189. Part 3: Remove snapshot backend function since it doesn't work and we may as well just fall back. r=jrmuizel |
michael@0 | 5 | |
michael@0 | 6 | diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c |
michael@0 | 7 | --- a/gfx/cairo/cairo/src/cairo-quartz-surface.c |
michael@0 | 8 | +++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c |
michael@0 | 9 | @@ -1993,33 +1993,16 @@ _cairo_quartz_surface_acquire_source_ima |
michael@0 | 10 | if (status) |
michael@0 | 11 | return _cairo_error (CAIRO_STATUS_NO_MEMORY); |
michael@0 | 12 | |
michael@0 | 13 | *image_extra = NULL; |
michael@0 | 14 | |
michael@0 | 15 | return CAIRO_STATUS_SUCCESS; |
michael@0 | 16 | } |
michael@0 | 17 | |
michael@0 | 18 | -static cairo_surface_t * |
michael@0 | 19 | -_cairo_quartz_surface_snapshot (void *abstract_surface) |
michael@0 | 20 | -{ |
michael@0 | 21 | - cairo_int_status_t status; |
michael@0 | 22 | - cairo_quartz_surface_t *surface = abstract_surface; |
michael@0 | 23 | - cairo_image_surface_t *image; |
michael@0 | 24 | - |
michael@0 | 25 | - if (surface->imageSurfaceEquiv) |
michael@0 | 26 | - return NULL; |
michael@0 | 27 | - |
michael@0 | 28 | - status = _cairo_quartz_get_image (surface, &image); |
michael@0 | 29 | - if (unlikely (status)) |
michael@0 | 30 | - return _cairo_surface_create_in_error (CAIRO_STATUS_NO_MEMORY); |
michael@0 | 31 | - |
michael@0 | 32 | - return &image->base; |
michael@0 | 33 | -} |
michael@0 | 34 | - |
michael@0 | 35 | static void |
michael@0 | 36 | _cairo_quartz_surface_release_source_image (void *abstract_surface, |
michael@0 | 37 | cairo_image_surface_t *image, |
michael@0 | 38 | void *image_extra) |
michael@0 | 39 | { |
michael@0 | 40 | cairo_surface_destroy ((cairo_surface_t *) image); |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | @@ -2916,17 +2899,17 @@ static const struct _cairo_surface_backe |
michael@0 | 44 | _cairo_quartz_surface_stroke, |
michael@0 | 45 | _cairo_quartz_surface_fill, |
michael@0 | 46 | #if CAIRO_HAS_QUARTZ_FONT |
michael@0 | 47 | _cairo_quartz_surface_show_glyphs, |
michael@0 | 48 | #else |
michael@0 | 49 | NULL, /* show_glyphs */ |
michael@0 | 50 | #endif |
michael@0 | 51 | |
michael@0 | 52 | - _cairo_quartz_surface_snapshot, |
michael@0 | 53 | + NULL, /* snapshot */ |
michael@0 | 54 | NULL, /* is_similar */ |
michael@0 | 55 | NULL /* fill_stroke */ |
michael@0 | 56 | }; |
michael@0 | 57 | |
michael@0 | 58 | cairo_quartz_surface_t * |
michael@0 | 59 | _cairo_quartz_surface_create_internal (CGContextRef cgContext, |
michael@0 | 60 | cairo_content_t content, |
michael@0 | 61 | unsigned int width, |
michael@0 | 62 |