mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gstglcontext: micro optimization to gst_gl_context_thread_add
Invoke the callback right away when called on the context thread. Removes overhead when nesting libgstgl calls (for example when working with the sync meta).
This commit is contained in:
parent
2b457a46a0
commit
2c0aca52a8
1 changed files with 3 additions and 1 deletions
|
@ -1489,8 +1489,10 @@ gst_gl_context_thread_add (GstGLContext * context,
|
||||||
g_return_if_fail (GST_IS_GL_CONTEXT (context));
|
g_return_if_fail (GST_IS_GL_CONTEXT (context));
|
||||||
g_return_if_fail (func != NULL);
|
g_return_if_fail (func != NULL);
|
||||||
|
|
||||||
if (GST_IS_GL_WRAPPED_CONTEXT (context)) {
|
if (GST_IS_GL_WRAPPED_CONTEXT (context))
|
||||||
g_return_if_fail (context->priv->active_thread == g_thread_self ());
|
g_return_if_fail (context->priv->active_thread == g_thread_self ());
|
||||||
|
|
||||||
|
if (context->priv->active_thread == g_thread_self ()) {
|
||||||
func (context, data);
|
func (context, data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue