gl-renderer: Don't accumulate damages on stale renderbuffers

Stale renderbuffers are kept in the renderbuffer list until they're
destroyed by the backend. In the meantime, they shouldn't accumulate
damages since they won't be used anymore.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
Loïc Molinari 2024-08-03 16:08:58 +02:00
parent e3878c8214
commit 47035a776c

View file

@ -2408,8 +2408,11 @@ gl_renderer_repaint_output(struct weston_output *output,
/* Accumulate damage in all renderbuffers */
wl_list_for_each(rb, &go->renderbuffer_list, link) {
pixman_region32_union(&rb->damage, &rb->damage, output_damage);
rb->border_damage |= go->border_status;
if (!rb->stale) {
pixman_region32_union(&rb->damage, &rb->damage,
output_damage);
rb->border_damage |= go->border_status;
}
}
if (renderbuffer)