mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
gsk: Clear current context after unrealize()
Make sure both GL renderers don't leave their contexts alive via the current context, but ensure they dispose of them properly. Fixes issues when the corresponding GL resources in the surfaces they were attached to go away.
This commit is contained in:
parent
b08ccc0bec
commit
a35f8d52d6
@ -258,6 +258,8 @@ gsk_gl_renderer_unrealize (GskRenderer *renderer)
|
||||
g_clear_object (&self->driver);
|
||||
g_clear_object (&self->command_queue);
|
||||
g_clear_object (&self->context);
|
||||
|
||||
gdk_gl_context_clear_current ();
|
||||
}
|
||||
|
||||
static cairo_region_t *
|
||||
|
@ -139,6 +139,8 @@ gsk_ngl_renderer_unrealize (GskRenderer *renderer)
|
||||
|
||||
gsk_ngl_renderer_free_backbuffer (self);
|
||||
|
||||
gdk_gl_context_clear_current ();
|
||||
|
||||
GSK_RENDERER_CLASS (gsk_ngl_renderer_parent_class)->unrealize (renderer);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user