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