mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-09 06:18:22 +02:00
[xlib] Check integer translation for XCopyArea.
A precondition for using the core XCopyArea protocol is that the source
attributes contain only integer translations. However, we failed to apply
any integer translations from the source matrix to the XCopyArea offsets.
This worked prior to 5b97ee6525 as
_cairo_pattern_acquire_surface_for_surface() was careful to only generate
an identity matrix if the pattern matrix only contained an integer
translation (and thus we would use XCopyArea in the xlib backend).
This commit is contained in:
parent
308485a3fc
commit
552cc09e6b
1 changed files with 8 additions and 2 deletions
|
|
@ -1741,12 +1741,18 @@ _cairo_xlib_surface_composite (cairo_operator_t op,
|
|||
status = _cairo_xlib_surface_ensure_gc (dst);
|
||||
if (status)
|
||||
goto BAIL;
|
||||
|
||||
is_integer_translation = _cairo_matrix_is_integer_translation (&src_attr.matrix,
|
||||
&itx, &ity);
|
||||
/* This is a pre-condition for DO_XCOPYAREA. */
|
||||
assert (is_integer_translation);
|
||||
|
||||
XCopyArea (dst->dpy,
|
||||
src->drawable,
|
||||
dst->drawable,
|
||||
dst->gc,
|
||||
src_x + src_attr.x_offset,
|
||||
src_y + src_attr.y_offset,
|
||||
src_x + src_attr.x_offset + itx,
|
||||
src_y + src_attr.y_offset + ity,
|
||||
width, height,
|
||||
dst_x, dst_y);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue