[PATCH weston 2/4] gl-renderer: Don't change the region supplied to output repaint

Ander Conselvan de Oliveira conselvan2 at gmail.com
Wed Mar 6 09:23:50 PST 2013


On Mar 6, 2013 6:45 PM, "Kristian Høgsberg" <hoegsberg at gmail.com> wrote:
>
> On Tue, Mar 05, 2013 at 05:30:28PM +0200, Ander Conselvan de Oliveira
wrote:
> > The core uses this region to clear from the primary plane damage the
> > area that was repainted. If we add the old buffer damage to that, it
> > may end up clearing more damage from the primary plane than it was
> > intended.
> > ---
> >  src/gl-renderer.c |   10 +++++++---
> >  1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/gl-renderer.c b/src/gl-renderer.c
> > index a5dc2f3..4c1bc23 100644
> > --- a/src/gl-renderer.c
> > +++ b/src/gl-renderer.c
> > @@ -957,6 +957,7 @@ gl_renderer_repaint_output(struct weston_output
*output,
> >       EGLBoolean ret;
> >       static int errored;
> >       int32_t width, height, i;
> > +     pixman_region32_t total_damage;
> >
> >       width = output->current->width +
> >               output->border.left + output->border.right;
> > @@ -987,10 +988,13 @@ gl_renderer_repaint_output(struct weston_output
*output,
> >                                     &go->buffer_damage[i],
> >                                     output_damage);
> >
> > -     pixman_region32_union(output_damage, output_damage,
> > -                           &go->buffer_damage[go->current_buffer]);
> > +     pixman_region32_init(&total_damage);
> > +     pixman_region32_copy(&total_damage,
> > +                          &go->buffer_damage[go->current_buffer]);
>
> Shouldn't total_damage still be the union of buffer_damage and
> output_damage?

Yes, it should. But we already did the union in the loop above. That was
actually one of your comments when you applied the buffer age patches, that
we were doing the union twice.

Cheers,
Ander

> > -     repaint_surfaces(output, output_damage);
> > +     repaint_surfaces(output, &total_damage);
> > +
> > +     pixman_region32_fini(&total_damage);
> >
> >       if (gr->border.texture)
> >               draw_border(output);
> > --
> > 1.7.10.4
> >
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130306/8195369f/attachment.html>


More information about the wayland-devel mailing list