michael@0: From: Benjamin Otte michael@0: Date: Thu, 29 Apr 2010 16:20:59 +0000 michael@0: Subject: xlib: Don't modify variables that are needed later michael@0: michael@0: In the XCopyArea region code, don't modify src_x/y when they are later michael@0: used in the unbounded fixup code. michael@0: michael@0: Exposed by composite-integer-translate-source test. michael@0: --- michael@0: diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c michael@0: index bedc3fd..30c08d3 100644 michael@0: --- a/gfx/cairo/cairo/src/cairo-xlib-surface.c michael@0: +++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c michael@0: @@ -2322,10 +2322,10 @@ _cairo_xlib_surface_composite (cairo_operator_t op, michael@0: width, height, michael@0: dst_x, dst_y); michael@0: } else { michael@0: - int n, num_rects; michael@0: + int n, num_rects, x, y; michael@0: michael@0: - src_x += src_attr.x_offset + itx - dst_x; michael@0: - src_y += src_attr.y_offset + ity - dst_y; michael@0: + x = src_x + src_attr.x_offset + itx - dst_x; michael@0: + y = src_y + src_attr.y_offset + ity - dst_y; michael@0: michael@0: num_rects = cairo_region_num_rectangles (clip_region); michael@0: for (n = 0; n < num_rects; n++) { michael@0: @@ -2333,7 +2333,7 @@ _cairo_xlib_surface_composite (cairo_operator_t op, michael@0: michael@0: cairo_region_get_rectangle (clip_region, n, &rect); michael@0: XCopyArea (dst->dpy, src->drawable, dst->drawable, gc, michael@0: - rect.x + src_x, rect.y + src_y, michael@0: + rect.x + x, rect.y + y, michael@0: rect.width, rect.height, michael@0: rect.x, rect.y); michael@0: } michael@0: -- michael@0: cgit v0.8.3-6-g21f6