[gtk+/wip/baedert/gl] gl renderer: Properly delete all shader programs
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gl] gl renderer: Properly delete all shader programs
- Date: Fri, 29 Dec 2017 04:34:52 +0000 (UTC)
commit 1f4f3b2dce75f97e15c888081486c405c188c6b6
Author: Timm Bäder <mail baedert org>
Date: Fri Dec 29 05:31:49 2017 +0100
gl renderer: Properly delete all shader programs
gsk/gl/gskglrenderer.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 6f064e7..95488e9 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -1870,6 +1870,7 @@ static void
gsk_gl_renderer_unrealize (GskRenderer *renderer)
{
GskGLRenderer *self = GSK_GL_RENDERER (renderer);
+ guint i;
if (self->gl_context == NULL)
return;
@@ -1881,13 +1882,8 @@ gsk_gl_renderer_unrealize (GskRenderer *renderer)
*/
g_array_set_size (self->render_ops, 0);
-
- glDeleteProgram (self->blend_program.id);
- glDeleteProgram (self->blit_program.id);
- glDeleteProgram (self->color_program.id);
- glDeleteProgram (self->coloring_program.id);
- glDeleteProgram (self->color_matrix_program.id);
- glDeleteProgram (self->linear_gradient_program.id);
+ for (i = 0; i < GL_N_PROGRAMS; i ++)
+ glDeleteProgram (self->programs[i].id);
gsk_gl_renderer_destroy_buffers (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]