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.
This commit is contained in:
Matthias Clasen
2023-02-01 08:05:15 +01:00
parent ead40dc834
commit a91fa9a680

View File

@@ -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);