[PATCH] compositor-wayland: Use correct damage coordinates for pixman backend
Armin Krezović
krezovic.armin at gmail.com
Mon Oct 23 14:10:01 UTC 2017
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);
--
2.14.2
More information about the wayland-devel
mailing list