mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +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
fb34d8a04b
commit
7e1a42ce55
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 (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 ());
|
||||
|
||||
if (context->priv->active_thread == g_thread_self ()) {
|
||||
func (context, data);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue