aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgthreadedrenderloop.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-09-21 13:23:31 +0000
committerLaszlo Agocs <laszlo.agocs@qt.io>2021-09-22 18:39:51 +0000
commit16646d45b75bb4432f7434a60ffe7120fc78d4de (patch)
treeffaedf57a88d16c3cba0a9fcb193c457ae217d23 /src/quick/scenegraph/qsgthreadedrenderloop.cpp
parentc300a170ed205bd255a412377fb6c26fd192bd4d (diff)
Revert "Reduce makeCurrents with unnecessarily different surfaces"
This reverts commit dfe321422b179feac4c416ed3a19aff8eb0407d4. Reason for revert: This _may_ be the cause for the occasional crashes in e.g. tst_qquickwindow::headless in some CI configurations. Hence trying a revert for now, to be reintroduced hopefully soon. Change-Id: I5df3e2b9880f004407efbd6db91f7f0e56bb4c5f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgthreadedrenderloop.cpp')
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
index d9ce2fa4dc..d7502054df 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp
+++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
@@ -446,11 +446,11 @@ bool QSGRenderThread::event(QEvent *e)
if (ce->window) {
if (rhi) {
QQuickWindowPrivate *cd = QQuickWindowPrivate::get(ce->window);
+ cd->rhi->makeThreadLocalNativeContextCurrent();
// The assumption is that the swapchain is usable, because on
// expose the thread starts up and renders a frame so one cannot
// get here without having done at least one on-screen frame.
cd->rhi->beginFrame(cd->swapchain);
- cd->rhi->makeThreadLocalNativeContextCurrent(); // for custom GL rendering before/during/after sync
cd->syncSceneGraph();
sgrc->endSync();
cd->renderSceneGraph(ce->window->size());
@@ -920,8 +920,6 @@ void QSGRenderThread::ensureRhi()
}
}
if (!sgrc->rhi() && windowSize.width() > 0 && windowSize.height() > 0) {
- // We need to guarantee that sceneGraphInitialized is emitted
- // with a context current, if running with OpenGL.
rhi->makeThreadLocalNativeContextCurrent();
QSGDefaultRenderContext::InitParams rcParams;
rcParams.rhi = rhi;