From b605c06e2ac8354ab0607fd1898fdc68e16e4b14 Mon Sep 17 00:00:00 2001 From: Ander Conselvan de Oliveira Date: Tue, 5 Mar 2013 17:30:28 +0200 Subject: [PATCH] gl-renderer: Don't change the region supplied to output repaint 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 a5dc2f34d..4c1bc233f 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]); - repaint_surfaces(output, output_damage); + repaint_surfaces(output, &total_damage); + + pixman_region32_fini(&total_damage); if (gr->border.texture) draw_border(output);