[gtk/wip/otte/for-master] ngl: Make current when unrealizing




commit 80e6f1ca8c4ade531c95e8186c32b69477baf2df
Author: Benjamin Otte <otte redhat com>
Date:   Sun Aug 8 02:17:08 2021 +0200

    ngl: Make current when unrealizing
    
    The profiler (at least) discards GL objects and we want to discard them
    on the right context.

 gsk/ngl/gsknglrenderer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gsk/ngl/gsknglrenderer.c b/gsk/ngl/gsknglrenderer.c
index 5f8a683b1e..cdb6717043 100644
--- a/gsk/ngl/gsknglrenderer.c
+++ b/gsk/ngl/gsknglrenderer.c
@@ -137,9 +137,11 @@ gsk_ngl_renderer_unrealize (GskRenderer *renderer)
 
   g_assert (GSK_IS_NGL_RENDERER (renderer));
 
+  gdk_gl_context_make_current (self->context);
+
   g_clear_object (&self->driver);
-  g_clear_object (&self->context);
   g_clear_object (&self->command_queue);
+  g_clear_object (&self->context);
 }
 
 static cairo_region_t *


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