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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user