From a91fa9a680c04aa62e521364fc89368622a461a0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 1 Feb 2023 08:05:15 +0100 Subject: [PATCH] gltexture: Only wait if we need to If the texture was created in the same context we are downloading it from, then waiting on the sync will be a no-op. --- gdk/gdkgltexture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/gdkgltexture.c b/gdk/gdkgltexture.c index 04c64259bb..51f3f97a4d 100644 --- a/gdk/gdkgltexture.c +++ b/gdk/gdkgltexture.c @@ -102,7 +102,7 @@ gdk_gl_texture_invoke_callback (gpointer data) gdk_gl_context_make_current (context); - if (invoke->self->sync) + if (invoke->self->sync && context != invoke->self->context) glWaitSync (invoke->self->sync, 0, GL_TIMEOUT_IGNORED); glBindTexture (GL_TEXTURE_2D, invoke->self->id);