mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-30 10:50:07 +01:00
glamor: Adjust for drawable x/y in composite's copy optimization
Patchb64108fa30added a short cut that identifies composite operations that can be performed with a simple copy instead. glamor_copy works in absolute coordinates, so the dx and dy values passed in need to be converted from drawable-relative to absolute by adding the drawable x/y values. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit8b9b4387e8)
This commit is contained in:
parent
fad7cab684
commit
f5b224a0e2
1 changed files with 4 additions and 0 deletions
|
|
@ -1434,6 +1434,10 @@ glamor_composite_clipped_region(CARD8 op,
|
|||
|| (op == PictOpOver
|
||||
&& source->format == dest->format
|
||||
&& !PICT_FORMAT_A(source->format)))))) {
|
||||
x_source += source->pDrawable->x;
|
||||
y_source += source->pDrawable->y;
|
||||
x_dest += dest->pDrawable->x;
|
||||
y_dest += dest->pDrawable->y;
|
||||
glamor_copy(source->pDrawable, dest->pDrawable, NULL,
|
||||
box, nbox, x_source - x_dest,
|
||||
y_source - y_dest, FALSE, FALSE, 0, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue