[PATCH xserver] glamor: Adjust for drawable x/y in composite's copy optimization
Alex Deucher
alexdeucher at gmail.com
Fri May 27 18:57:33 UTC 2016
On Fri, May 27, 2016 at 2:05 PM, Keith Packard <keithp at keithp.com> wrote:
> Patch b64108fa305e956e4edaae9d53071ff0abee268e 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 at keithp.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> glamor/glamor_render.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
> index 9c5cca6..165bced 100644
> --- a/glamor/glamor_render.c
> +++ b/glamor/glamor_render.c
> @@ -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);
> --
> 2.8.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list