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.
This commit is contained in:
Emmanuele Bassi 2023-09-26 14:44:05 +01:00
parent 90be2baf8b
commit 3ea723730b

View File

@ -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);