From ac5874194034d57fe4f162511dd5e1e5ebe3ac19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 25 Jan 2012 21:48:26 -0500 Subject: [PATCH] compositor: Assign surface damage before setting up scanout buffers --- src/compositor.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index b4c766c8..71f71f82 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -816,6 +816,12 @@ weston_output_repaint(struct weston_output *output) pixman_region32_fini(&opaque); pixman_region32_fini(&new_damage); + wl_list_for_each(es, &ec->surface_list, link) { + pixman_region32_copy(&es->damage, &total_damage); + pixman_region32_subtract(&total_damage, + &total_damage, &es->opaque); + } + es = container_of(ec->surface_list.next, struct weston_surface, link); if (setup_scanout_surface(output, es) == 0) @@ -828,11 +834,6 @@ weston_output_repaint(struct weston_output *output) glClear(GL_COLOR_BUFFER_BIT); weston_surface_draw(es, output, &total_damage); } else { - wl_list_for_each(es, &ec->surface_list, link) { - pixman_region32_copy(&es->damage, &total_damage); - pixman_region32_subtract(&total_damage, &total_damage, &es->opaque); - } - wl_list_for_each_reverse(es, &ec->surface_list, link) { pixman_region32_init(&repaint); pixman_region32_intersect(&repaint, &output->region,