mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 12:18:01 +02:00
xlib: Don't modify variables that are needed later
In the XCopyArea region code, don't modify src_x/y when they are later used in the unbounded fixup code. Exposed by composite-integer-translate-source test.
This commit is contained in:
parent
90160deb2a
commit
5d07307b69
1 changed files with 4 additions and 4 deletions
|
|
@ -2322,10 +2322,10 @@ _cairo_xlib_surface_composite (cairo_operator_t op,
|
|||
width, height,
|
||||
dst_x, dst_y);
|
||||
} else {
|
||||
int n, num_rects;
|
||||
int n, num_rects, x, y;
|
||||
|
||||
src_x += src_attr.x_offset + itx - dst_x;
|
||||
src_y += src_attr.y_offset + ity - dst_y;
|
||||
x = src_x + src_attr.x_offset + itx - dst_x;
|
||||
y = src_y + src_attr.y_offset + ity - dst_y;
|
||||
|
||||
num_rects = cairo_region_num_rectangles (clip_region);
|
||||
for (n = 0; n < num_rects; n++) {
|
||||
|
|
@ -2333,7 +2333,7 @@ _cairo_xlib_surface_composite (cairo_operator_t op,
|
|||
|
||||
cairo_region_get_rectangle (clip_region, n, &rect);
|
||||
XCopyArea (display->display, src->drawable, dst->drawable, gc,
|
||||
rect.x + src_x, rect.y + src_y,
|
||||
rect.x + x, rect.y + y,
|
||||
rect.width, rect.height,
|
||||
rect.x, rect.y);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue