gfx/cairo/quartz-mark-dirty.patch

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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 Date: Thu Jan 5 18:40:01 2012 -0500
michael@0 2
michael@0 3 Bug 715704. Add a quartz implementation of mark_dirty_rectangle. r=roc
michael@0 4
michael@0 5 We need to drop our CGImage cache when the surface has been changed by outside users.
michael@0 6
michael@0 7 diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
michael@0 8 --- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
michael@0 9 +++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
michael@0 10 @@ -3116,16 +3116,27 @@ _cairo_quartz_surface_clipper_intersect_
michael@0 11 CGContextEOClip (surface->cgContext);
michael@0 12 }
michael@0 13
michael@0 14 ND((stderr, "-- intersect_clip_path\n"));
michael@0 15
michael@0 16 return CAIRO_STATUS_SUCCESS;
michael@0 17 }
michael@0 18
michael@0 19 +static cairo_status_t
michael@0 20 +_cairo_quartz_surface_mark_dirty_rectangle (void *abstract_surface,
michael@0 21 + int x, int y,
michael@0 22 + int width, int height)
michael@0 23 +{
michael@0 24 + cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface;
michael@0 25 + _cairo_quartz_surface_will_change (surface);
michael@0 26 + return CAIRO_STATUS_SUCCESS;
michael@0 27 +}
michael@0 28 +
michael@0 29 +
michael@0 30 // XXXtodo implement show_page; need to figure out how to handle begin/end
michael@0 31
michael@0 32 static const struct _cairo_surface_backend cairo_quartz_surface_backend = {
michael@0 33 CAIRO_SURFACE_TYPE_QUARTZ,
michael@0 34 _cairo_quartz_surface_create_similar,
michael@0 35 _cairo_quartz_surface_finish,
michael@0 36 _cairo_quartz_surface_acquire_image,
michael@0 37 _cairo_quartz_surface_release_source_image,
michael@0 38 @@ -3138,17 +3149,17 @@ static const struct _cairo_surface_backe
michael@0 39 NULL, /* create_span_renderer */
michael@0 40 NULL, /* check_span_renderer */
michael@0 41 NULL, /* copy_page */
michael@0 42 NULL, /* show_page */
michael@0 43 _cairo_quartz_surface_get_extents,
michael@0 44 NULL, /* old_show_glyphs */
michael@0 45 NULL, /* get_font_options */
michael@0 46 NULL, /* flush */
michael@0 47 - NULL, /* mark_dirty_rectangle */
michael@0 48 + _cairo_quartz_surface_mark_dirty_rectangle,
michael@0 49 NULL, /* scaled_font_fini */
michael@0 50 NULL, /* scaled_glyph_fini */
michael@0 51
michael@0 52 _cairo_quartz_surface_paint,
michael@0 53 _cairo_quartz_surface_mask,
michael@0 54 _cairo_quartz_surface_stroke,
michael@0 55 _cairo_quartz_surface_fill,
michael@0 56 _cairo_quartz_surface_show_glyphs,

mercurial