glamor: Adjust for drawable x/y in composite's copy optimization
Patch b64108fa30
added 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>
This commit is contained in:
parent
0d16a0c3b9
commit
8b9b4387e8
|
@ -1436,6 +1436,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…
Reference in New Issue
Block a user