<div dir="ltr"><div>If there was a buffer damage request, this should not damage the entire buffer, since supposedly the client sent the correct damage rectangle. I think it would be a good idea to enforce this so that clients changing the transform don't send incorrect damage regions (in particular *no* damage region) and still cause correct output.<br><br></div><div>If you are trying to figure out the area of the outputs to recomposite, the actual area is the union of the old and new surface regions. Looks like you are setting it to the entire output.<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 2, 2015 at 12:56 PM, Derek Foreman <span dir="ltr"><<a href="mailto:derekf@osg.samsung.com" target="_blank">derekf@osg.samsung.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Surface damage has a curious relationship with buffer damage. If we<br>
change our buffer orientation, the whole buffer contents will likely<br>
change. The application is really only supposed to tell us what parts<br>
of the surface changed, which could still just be a subset.<br>
<br>
Since the gl renderer uses the damage rectangles for texture uploads, it<br>
won't upload the entire buffer contents after an orientation change.<br>
<br>
To deal with this we just damage the entire surface any time the buffer<br>
viewport changes.<br>
<br>
This fixes weston_simple_damage --rotating-transform when using the gl<br>
renderer.<br>
<br>
Signed-off-by: Derek Foreman <<a href="mailto:derekf@osg.samsung.com">derekf@osg.samsung.com</a>><br>
---<br>
src/compositor.c | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/compositor.c b/src/compositor.c<br>
index 33d500e..5a2f3aa 100644<br>
--- a/src/compositor.c<br>
+++ b/src/compositor.c<br>
@@ -2761,6 +2761,10 @@ weston_surface_commit_state(struct weston_surface *surface,<br>
surface->configure(surface, state->sx, state->sy);<br>
}<br>
<br>
+ if (state->buffer_viewport.changed)<br>
+ pixman_region32_union_rect(&surface->damage, &surface->damage,<br>
+ 0, 0, INT32_MAX, INT32_MAX);<br>
+<br>
state->sx = 0;<br>
state->sy = 0;<br>
state->newly_attached = 0;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.6.2<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</font></span></blockquote></div><br></div>