mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
Use the new api to release resources
When we unrealize a GL area with outstanding textures, call gdk_texture_release_gl on them to avoid later crashes.
This commit is contained in:
parent
5e302ae2cc
commit
47b7bfd2ba
@ -385,11 +385,15 @@ delete_one_texture (gpointer data)
|
||||
{
|
||||
Texture *texture = data;
|
||||
|
||||
if (texture->holder)
|
||||
gdk_texture_release_gl (texture->holder);
|
||||
|
||||
if (texture->id != 0)
|
||||
{
|
||||
glDeleteTextures (1, &texture->id);
|
||||
texture->id = 0;
|
||||
}
|
||||
|
||||
g_free (texture);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user