On Mon, 23 Oct 2017 16:10:01 +0200
Armin Krezović <[email protected]> wrote:

> Damage coordinates are in global coordinate space, and they need to
> be translated to local coordinate space so multiple outputs can work.
> ---
>  libweston/compositor-wayland.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c
> index 1f77385b..e9054221 100644
> --- a/libweston/compositor-wayland.c
> +++ b/libweston/compositor-wayland.c
> @@ -556,11 +556,15 @@ wayland_shm_buffer_attach(struct wayland_shm_buffer *sb)
>       int i, n;
>  
>       pixman_region32_init(&damage);
> +     pixman_region32_copy(&damage, &sb->damage);
> +     pixman_region32_translate(&damage, -sb->output->base.x,
> +                               -sb->output->base.y);
> +
>       weston_transformed_region(sb->output->base.width,
>                                 sb->output->base.height,
>                                 sb->output->base.transform,
>                                 sb->output->base.current_scale,
> -                               &sb->damage, &damage);
> +                               &damage, &damage);
>  
>       if (sb->output->frame) {
>               frame_interior(sb->output->frame, &ix, &iy, &iwidth, &iheight);

Hi Armin,

yeah, this patch seems to the fix the very issue and looks correct. I
will send it to the list again as part of my other wayland-backend
fixes with the commit message extended. Awesome!

I reviewed the uses of sb->damage member everywhere, and fixed one more
place, though that was probably insignificant.


Thanks,
pq

Attachment: pgpbdMIC8yI18.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to