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 | From: Benjamin Otte <otte@redhat.com> |
michael@0 | 2 | Date: Thu, 29 Apr 2010 16:20:59 +0000 |
michael@0 | 3 | Subject: xlib: Don't modify variables that are needed later |
michael@0 | 4 | |
michael@0 | 5 | In the XCopyArea region code, don't modify src_x/y when they are later |
michael@0 | 6 | used in the unbounded fixup code. |
michael@0 | 7 | |
michael@0 | 8 | Exposed by composite-integer-translate-source test. |
michael@0 | 9 | --- |
michael@0 | 10 | diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c |
michael@0 | 11 | index bedc3fd..30c08d3 100644 |
michael@0 | 12 | --- a/gfx/cairo/cairo/src/cairo-xlib-surface.c |
michael@0 | 13 | +++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c |
michael@0 | 14 | @@ -2322,10 +2322,10 @@ _cairo_xlib_surface_composite (cairo_operator_t op, |
michael@0 | 15 | width, height, |
michael@0 | 16 | dst_x, dst_y); |
michael@0 | 17 | } else { |
michael@0 | 18 | - int n, num_rects; |
michael@0 | 19 | + int n, num_rects, x, y; |
michael@0 | 20 | |
michael@0 | 21 | - src_x += src_attr.x_offset + itx - dst_x; |
michael@0 | 22 | - src_y += src_attr.y_offset + ity - dst_y; |
michael@0 | 23 | + x = src_x + src_attr.x_offset + itx - dst_x; |
michael@0 | 24 | + y = src_y + src_attr.y_offset + ity - dst_y; |
michael@0 | 25 | |
michael@0 | 26 | num_rects = cairo_region_num_rectangles (clip_region); |
michael@0 | 27 | for (n = 0; n < num_rects; n++) { |
michael@0 | 28 | @@ -2333,7 +2333,7 @@ _cairo_xlib_surface_composite (cairo_operator_t op, |
michael@0 | 29 | |
michael@0 | 30 | cairo_region_get_rectangle (clip_region, n, &rect); |
michael@0 | 31 | XCopyArea (dst->dpy, src->drawable, dst->drawable, gc, |
michael@0 | 32 | - rect.x + src_x, rect.y + src_y, |
michael@0 | 33 | + rect.x + x, rect.y + y, |
michael@0 | 34 | rect.width, rect.height, |
michael@0 | 35 | rect.x, rect.y); |
michael@0 | 36 | } |
michael@0 | 37 | -- |
michael@0 | 38 | cgit v0.8.3-6-g21f6 |