From 3ea723730bb0a9608dd973c9383f70b873909f62 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 26 Sep 2023 14:44:05 +0100 Subject: [PATCH] broadway: Do not add an extra reference when caching textures We just created a GdkTexture, so we don't need to acquire a reference if we're transferring the ownership to the node cache. --- gsk/broadway/gskbroadwayrenderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsk/broadway/gskbroadwayrenderer.c b/gsk/broadway/gskbroadwayrenderer.c index 1343525a92..9b945b8fd2 100644 --- a/gsk/broadway/gskbroadwayrenderer.c +++ b/gsk/broadway/gskbroadwayrenderer.c @@ -614,7 +614,7 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer, } texture = gdk_texture_new_for_surface (image_surface); - g_ptr_array_add (self->node_textures, g_object_ref (texture)); /* Transfers ownership to node_textures */ + g_ptr_array_add (self->node_textures, texture); /* Transfers ownership to node_textures */ texture_id = gdk_broadway_display_ensure_texture (display, texture); add_rect (nodes, &node->bounds, offset_x, offset_y);