[PATCH] compositor: Fix incoherent coordinates when accumulating plane damage

haruband haruband at gmail.com
Sat Feb 8 17:56:37 PST 2014


When calculating view's damage region in view_accumulate_damage(), the
coordinates of view's damage are incoherent with other regions, which are
treated together, such as view transform's boundingbox and opaque regions. This
commit simply removes the translation to plane coordinates to solve this
issue.
---
 src/compositor.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 9de3a90..a0c2e9d 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1525,14 +1525,11 @@ view_accumulate_damage(struct weston_view *view,
 				  extents->x2 - extents->x1,
 				  extents->y2 - extents->y1,
 				  &damage);
-		pixman_region32_translate(&damage,
-					  -view->plane->x,
-					  -view->plane->y);
 	} else {
 		pixman_region32_copy(&damage, &view->surface->damage);
 		pixman_region32_translate(&damage,
-					  view->geometry.x - view->plane->x,
-					  view->geometry.y - view->plane->y);
+					  view->geometry.x,
+					  view->geometry.y);
 	}
 
 	pixman_region32_subtract(&damage, &damage, opaque);
-- 
1.8.3.2



More information about the wayland-devel mailing list