Commit 8b9b4387 authored by Keith Packard's avatar Keith Packard

glamor: Adjust for drawable x/y in composite's copy optimization

Patch b64108fa 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's avatarKeith Packard <keithp@keithp.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0d16a0c3
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment