diff --git a/gsk/gl/gskgldriver.c b/gsk/gl/gskgldriver.c index 95351cd051..dfccd315fc 100644 --- a/gsk/gl/gskgldriver.c +++ b/gsk/gl/gskgldriver.c @@ -535,8 +535,6 @@ gsk_gl_driver_get_texture_for_texture (GskGLDriver *self, } t = create_texture (self, gdk_texture_get_width (texture), gdk_texture_get_height (texture)); - gdk_gl_context_label_object_printf (self->gl_context, GL_TEXTURE, t->texture_id, - "GdkTexture<%p> %d", texture, t->texture_id); if (gdk_texture_set_render_data (texture, self, t, gsk_gl_driver_release_texture)) t->user = texture; @@ -547,6 +545,9 @@ gsk_gl_driver_get_texture_for_texture (GskGLDriver *self, surface, min_filter, mag_filter); + gdk_gl_context_label_object_printf (self->gl_context, GL_TEXTURE, t->texture_id, + "GdkTexture<%p> %d", texture, t->texture_id); + cairo_surface_destroy (surface); return t->texture_id; diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index 00351cdbca..2ec0e40823 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -479,14 +479,14 @@ render_fallback_node (GskGLRenderer *self, texture_id = gsk_gl_driver_create_texture (self->gl_driver, surface_width, surface_height); - gdk_gl_context_label_object_printf (self->gl_context, GL_TEXTURE, texture_id, - "Fallback %s %d", node->node_class->type_name, texture_id); - gsk_gl_driver_bind_source_texture (self->gl_driver, texture_id); gsk_gl_driver_init_texture_with_surface (self->gl_driver, texture_id, surface, GL_NEAREST, GL_NEAREST); + gdk_gl_context_label_object_printf (self->gl_context, GL_TEXTURE, texture_id, + "Fallback %s %d", node->node_class->type_name, texture_id); + cairo_surface_destroy (surface); @@ -1431,10 +1431,10 @@ render_outset_shadow_node (GskGLRenderer *self, GskRoundedRect blit_clip; texture_id = gsk_gl_driver_create_texture (self->gl_driver, texture_width, texture_height); - gdk_gl_context_label_object_printf (self->gl_context, GL_TEXTURE, texture_id, - "Outset Shadow Temp %d", texture_id); gsk_gl_driver_bind_source_texture (self->gl_driver, texture_id); gsk_gl_driver_init_texture_empty (self->gl_driver, texture_id); + gdk_gl_context_label_object_printf (self->gl_context, GL_TEXTURE, texture_id, + "Outset Shadow Temp %d", texture_id); render_target = gsk_gl_driver_create_render_target (self->gl_driver, texture_id, FALSE, FALSE); gdk_gl_context_label_object_printf (self->gl_context, GL_FRAMEBUFFER, render_target, "Outset Shadow FB Temp %d", render_target); @@ -1468,10 +1468,10 @@ render_outset_shadow_node (GskGLRenderer *self, }); blurred_texture_id = gsk_gl_driver_create_permanent_texture (self->gl_driver, texture_width, texture_height); - gdk_gl_context_label_object_printf (self->gl_context, GL_TEXTURE, blurred_texture_id, - "Outset Shadow Cache %d", blurred_texture_id); gsk_gl_driver_bind_source_texture (self->gl_driver, blurred_texture_id); gsk_gl_driver_init_texture_empty (self->gl_driver, blurred_texture_id); + gdk_gl_context_label_object_printf (self->gl_context, GL_TEXTURE, blurred_texture_id, + "Outset Shadow Cache %d", blurred_texture_id); blurred_render_target = gsk_gl_driver_create_render_target (self->gl_driver, blurred_texture_id, TRUE, TRUE); gdk_gl_context_label_object_printf (self->gl_context, GL_FRAMEBUFFER, render_target, "Outset Shadow Cache FB %d", render_target);