Commit 21acf312 authored by Matthew Waters's avatar Matthew Waters 🐨 Committed by GStreamer Merge Bot

qt: don't always activate/deactivate our GstGLContext

Techincally it is enough to activate at the beginning and then forget.
parent 73cd4477
......@@ -99,8 +99,6 @@ GstQSGTexture::bind ()
if (!this->qt_context_)
return;
gst_gl_context_activate (this->qt_context_, TRUE);
if (!this->buffer_)
goto out;
if (GST_VIDEO_INFO_FORMAT (&this->v_info) == GST_VIDEO_FORMAT_UNKNOWN)
......@@ -174,8 +172,6 @@ out:
funcs->glBindTexture (GL_TEXTURE_2D, this->dummy_tex_id_);
}
gst_gl_context_activate (this->qt_context_, FALSE);
}
/* can be called from any thread */
......
......@@ -199,7 +199,9 @@ QtGLVideoItem::updatePaintNode(QSGNode * oldNode,
GstQSGTexture *tex;
g_mutex_lock (&this->priv->lock);
gst_gl_context_activate (this->priv->other_context, TRUE);
if (gst_gl_context_get_current() == NULL)
gst_gl_context_activate (this->priv->other_context, TRUE);
GST_TRACE ("%p updatePaintNode", this);
......@@ -238,7 +240,6 @@ QtGLVideoItem::updatePaintNode(QSGNode * oldNode,
texNode->setRect (QRectF (result.x, result.y, result.w, result.h));
gst_gl_context_activate (this->priv->other_context, FALSE);
g_mutex_unlock (&this->priv->lock);
return texNode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment