From ce918e81390de0a3734bc310ca8f095a4b7e0bd1 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Thu, 4 May 2023 13:50:27 -0400 Subject: [PATCH] wlr_compositor: Move buffer damage clear to end of commit It makes sense to do it here because it is where we null the buffer. The buffer damage is only useful to us as long as we have the buffer. --- types/wlr_compositor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c index 081af3539..4b3e71554 100644 --- a/types/wlr_compositor.c +++ b/types/wlr_compositor.c @@ -564,6 +564,8 @@ static void surface_commit_state(struct wlr_surface *surface, // released immediately on commit when they are uploaded to the GPU. wlr_buffer_unlock(surface->current.buffer); surface->current.buffer = NULL; + + pixman_region32_clear(&surface->buffer_damage); } static void surface_handle_commit(struct wl_client *client,