[gtk] gl renderer: A GdkGLTexture's context might be NULL
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] gl renderer: A GdkGLTexture's context might be NULL
- Date: Mon, 20 May 2019 10:51:56 +0000 (UTC)
commit 6a69dc6e5d2eeef2a9343f0d289c15d5565d6269
Author: Timm Bäder <mail baedert org>
Date: Mon May 20 09:33:55 2019 +0200
gl renderer: A GdkGLTexture's context might be NULL
gdk_gl_texture_download ought to still work, but we can't make a NULL
context current obviously.
gsk/gl/gskgldriver.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gl/gskgldriver.c b/gsk/gl/gskgldriver.c
index dfccd315fc..4dd603b040 100644
--- a/gsk/gl/gskgldriver.c
+++ b/gsk/gl/gskgldriver.c
@@ -511,8 +511,11 @@ gsk_gl_driver_get_texture_for_texture (GskGLDriver *self,
{
/* In this case, we have to temporarily make the texture's context the current one,
* download its data into our context and then create a texture from it. */
- gdk_gl_context_make_current (texture_context);
+ if (texture_context)
+ gdk_gl_context_make_current (texture_context);
+
surface = gdk_texture_download_surface (texture);
+
gdk_gl_context_make_current (self->gl_context);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]