projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb34d8a
)
gstglcontext: micro optimization to gst_gl_context_thread_add
author
Alessandro Decina
<alessandro.d@gmail.com>
Wed, 10 Feb 2016 02:08:43 +0000
(13:08 +1100)
committer
Tim-Philipp Müller
<tim@centricular.com>
Sat, 9 Dec 2017 19:32:16 +0000
(19:32 +0000)
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).
gst-libs/gst/gl/gstglcontext.c
patch
|
blob
|
history
diff --git
a/gst-libs/gst/gl/gstglcontext.c
b/gst-libs/gst/gl/gstglcontext.c
index f103146b8f5d5cee92f088d31bfb510e12302b27..48a5387e8ae994a7ef2108f801dc1f73522a5d2a 100644
(file)
--- a/
gst-libs/gst/gl/gstglcontext.c
+++ b/
gst-libs/gst/gl/gstglcontext.c
@@
-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;
}