[PATCH weston 2/2] compositor: Damage the whole surface if the viewport changes
Derek Foreman
derekf at osg.samsung.com
Wed Dec 2 12:56:39 PST 2015
Surface damage has a curious relationship with buffer damage. If we
change our buffer orientation, the whole buffer contents will likely
change. The application is really only supposed to tell us what parts
of the surface changed, which could still just be a subset.
Since the gl renderer uses the damage rectangles for texture uploads, it
won't upload the entire buffer contents after an orientation change.
To deal with this we just damage the entire surface any time the buffer
viewport changes.
This fixes weston_simple_damage --rotating-transform when using the gl
renderer.
Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
src/compositor.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/compositor.c b/src/compositor.c
index 33d500e..5a2f3aa 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2761,6 +2761,10 @@ weston_surface_commit_state(struct weston_surface *surface,
surface->configure(surface, state->sx, state->sy);
}
+ if (state->buffer_viewport.changed)
+ pixman_region32_union_rect(&surface->damage, &surface->damage,
+ 0, 0, INT32_MAX, INT32_MAX);
+
state->sx = 0;
state->sy = 0;
state->newly_attached = 0;
--
2.6.2
More information about the wayland-devel
mailing list