gl-renderer: Fix debug clear region

The debug clear region must be generated out of the current render
buffer's damage region, not out of the current damage region, unless
shadow 16F is enabled.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
Loïc Molinari 2024-07-26 13:32:35 +02:00 committed by Daniel Stone
parent 215d552ce1
commit c65284bf9d
1 changed files with 3 additions and 2 deletions

View File

@ -2337,11 +2337,12 @@ gl_renderer_repaint_output(struct weston_output *output,
* EGL_KHR_partial_update, since we damage the whole area. */
if (gr->debug_clear) {
pixman_region32_t undamaged;
pixman_region32_t *damaged =
shadow_exists(go) ? output_damage : &rb->base.damage;
int debug_mode = gr->debug_mode;
pixman_region32_init(&undamaged);
pixman_region32_subtract(&undamaged, &output->region,
output_damage);
pixman_region32_subtract(&undamaged, &output->region, damaged);
gr->debug_mode = DEBUG_MODE_NONE;
repaint_views(output, &undamaged);
gr->debug_mode = debug_mode;