From 777beb0d0a4afb1aa29042f2a1574d53f2687277 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 8 May 2019 18:18:11 +0200 Subject: [PATCH] glrenderer: Ensure current context for debug stuff --- gsk/gl/gskglrenderer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index 2902e8a82a..5fa1f795b8 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -3145,6 +3145,7 @@ gsk_gl_renderer_render_texture (GskRenderer *renderer, g_return_val_if_fail (self->gl_context != NULL, NULL); + gdk_gl_context_make_current (self->gl_context); gdk_gl_context_push_debug_group_printf (self->gl_context, "Render %s<%p> to texture", root->node_class->type_name, root); @@ -3152,7 +3153,6 @@ gsk_gl_renderer_render_texture (GskRenderer *renderer, height = ceilf (viewport->size.height); self->scale_factor = gdk_surface_get_scale_factor (gsk_renderer_get_surface (renderer)); - gdk_gl_context_make_current (self->gl_context); /* Prepare our framebuffer */ gsk_gl_driver_begin_frame (self->gl_driver); @@ -3204,6 +3204,7 @@ gsk_gl_renderer_render (GskRenderer *renderer, if (self->gl_context == NULL) return; + gdk_gl_context_make_current (self->gl_context); gdk_gl_context_push_debug_group_printf (self->gl_context, "Render root node %p", root);