diff options
author | Alexander Orzechowski <orzechowski.alexander@gmail.com> | 2022-10-14 14:30:44 -0400 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-10-14 20:11:28 +0000 |
commit | c07424411af5a4581dc16d5aa91b167b16c7826e (patch) | |
tree | aa237a4c25a38cea7cf4a64a7dc208097c0f7729 | |
parent | 9560a7eefdffcd3694827bd2c6db28696f6ac957 (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-- | types/scene/wlr_scene.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 9c274f39..c5c301a7 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/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 |