mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
qmlgloverlay: fix multiple elements with Qt 5.15
With Qt 5.15 multiple qmlgloverlay elements would produce: ASSERT: "!m_gl->property(QSG_RENDERCONTEXT_PROPERTY).isValid()" in file /path/to/qt5/qtdeclarative/src/quick/scenegraph/qsgdefaultrendercontext.cpp, line 121 Workaround by setting the (seeminigly unused) property before initialization. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/695>
This commit is contained in:
parent
e9a0307b94
commit
625e56d3b4
1 changed files with 12 additions and 0 deletions
|
@ -634,6 +634,18 @@ void GstQuickRenderer::initializeGstGL ()
|
|||
return;
|
||||
}
|
||||
GST_INFO ("current QOpenGLContext %p", QOpenGLContext::currentContext());
|
||||
|
||||
/* XXX: Avoid an assertion inside QSGDefaultRenderContext::initialize()
|
||||
* from an unused (in this scenario) property when using multiple
|
||||
* QQuickRenderControl's with the same QOpenGLContext.
|
||||
*
|
||||
* First noticed with Qt 5.15. Idea from:
|
||||
* https://forum.qt.io/topic/55888/is-it-impossible-that-2-qquickrendercontrol-use-same-qopenglcontext/2
|
||||
*
|
||||
* ASSERT: "!m_gl->property(QSG_RENDERCONTEXT_PROPERTY).isValid()" in file /path/to/qt5/qtdeclarative/src/quick/scenegraph/qsgdefaultrendercontext.cpp, line 121
|
||||
*/
|
||||
m_sharedRenderData->m_context->setProperty("_q_sgrendercontext", QVariant());
|
||||
|
||||
m_renderControl->initialize(m_sharedRenderData->m_context);
|
||||
|
||||
/* 1. QAnimationDriver's are thread-specific
|
||||
|
|
Loading…
Reference in a new issue