[gtk/wip/baedert/gl-rework: 66/127] gl renderer: remove a memory leak



commit e93fdd788f60b71426da507a2918cbba03fd13fc
Author: Timm Bäder <mail baedert org>
Date:   Tue Dec 10 14:49:30 2019 +0100

    gl renderer: remove a memory leak

 gsk/gl/gskglrenderer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 16cd775204..5d9c49bc6e 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -466,15 +466,15 @@ add_rect_ops (RenderOpBuilder       *builder,
   });
 }
 
+static GdkRGBA BLACK = {0, 0, 0, 1};
+
 static void G_GNUC_UNUSED
 add_rect_outline_ops (GskGLRenderer         *self,
                       RenderOpBuilder       *builder,
                       const graphene_rect_t *rect)
 {
-  GdkRGBA *color = gdk_rgba_copy (&GDK_RGBA ("000")); /* Leaked */
-
   ops_set_program (builder, &self->color_program);
-  ops_set_color (builder, color);
+  ops_set_color (builder, &BLACK);
 
   add_rect_ops (builder,
                 &GRAPHENE_RECT_INIT (rect->origin.x, rect->origin.y,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]