summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-01-25 21:48:26 -0500
committerKristian Høgsberg <krh@bitplanet.net>2012-01-25 21:48:26 -0500
commitac5874194034d57fe4f162511dd5e1e5ebe3ac19 (patch)
tree2b8460cc79fdaf5e9785e0d3118e9224424cad7b
parent6af8eb9c7f32799ddc75e1732c50fbd23fb56994 (diff)
compositor: Assign surface damage before setting up scanout buffers
-rw-r--r--src/compositor.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/compositor.c b/src/compositor.c
index b4c766c..71f71f8 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,