summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <[email protected]>2022-10-14 14:30:44 -0400
committerKirill Primak <[email protected]>2022-10-14 20:11:28 +0000
commit5d41344ec0f3369732fd4e5d75d8ac8d2d867fe6 (patch)
treeb0712cd5bc0d1cc0e21506a5637087d485cbe7c9
parentf5f83652b274683ecc8fd84f87fb768236d2733e (diff)
wlr_scene: Destroy the texture when setting a new buffer.
Fixes: https://github.com/labwc/labwc/issues/587 Fixes: f0e31e806f7cb88c9d55dc0eb1876c86600d28df (wlr_scene: Fix not updating the scene node when setting a new buffer)
-rw-r--r--wlr_scene.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wlr_scene.c b/wlr_scene.c
index 9c274f3..c5c301a 100644
--- a/wlr_scene.c
+++ b/wlr_scene.c
@@ -566,6 +566,9 @@ void wlr_scene_buffer_set_buffer_with_damage(struct wlr_scene_buffer *scene_buff
bool update = false;
wlr_buffer_unlock(scene_buffer->buffer);
+ wlr_texture_destroy(scene_buffer->texture);
+ scene_buffer->texture = NULL;
+
if (buffer) {
// if this node used to not be mapped or its previous displayed
// buffer region will be different from what the new buffer would