[gtk/wip/chergert/glproto: 743/920] cleanup texture state when freeing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 743/920] cleanup texture state when freeing
- Date: Mon, 8 Feb 2021 19:15:40 +0000 (UTC)
commit 4de3166ccade9b2af0806cd97c7f7fd7848b4ead
Author: Christian Hergert <chergert redhat com>
Date: Thu Jan 21 09:56:10 2021 -0800
cleanup texture state when freeing
gsk/next/gskgldriver.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/gsk/next/gskgldriver.c b/gsk/next/gskgldriver.c
index 409414e14e..6162480830 100644
--- a/gsk/next/gskgldriver.c
+++ b/gsk/next/gskgldriver.c
@@ -77,6 +77,14 @@ gsk_gl_texture_free (gpointer data)
if (texture != NULL)
{
+ if (texture->user)
+ gdk_texture_clear_render_data (texture->user);
+
+ if (texture->texture_id != 0)
+ glDeleteTextures (1, &texture->texture_id);
+
+ /* TODO: Clear slices */
+
g_slice_free (GskGLTexture, texture);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]