[gtk/wip/chergert/glproto] cleanup texture state when freeing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto] cleanup texture state when freeing
- Date: Thu, 21 Jan 2021 17:56:16 +0000 (UTC)
commit 1dd9884d7409d9234fa343d9c00d91127087f401
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]