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.
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. On Wed, Dec 2, 2015 at 12:56 PM, Derek Foreman <[email protected]> wrote: > 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 <[email protected]> > --- > 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 > > _______________________________________________ > wayland-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/wayland-devel >
_______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
