From e0436b3d5974520c774951b7e139a6d56e60f83d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 29 Dec 2017 05:31:49 +0100 Subject: [PATCH] gl renderer: Properly delete all shader programs --- gsk/gl/gskglrenderer.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index cbaff88adc..5a5594a29e 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -1869,6 +1869,7 @@ static void gsk_gl_renderer_unrealize (GskRenderer *renderer) { GskGLRenderer *self = GSK_GL_RENDERER (renderer); + guint i; if (self->gl_context == NULL) return; @@ -1880,13 +1881,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);