aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgrhisupport.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-04-30 14:49:19 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-05-11 15:28:31 +0200
commit2ec94364f1bf58502747fc42597716aa2a8d19ae (patch)
tree466e0775845f54f847abf0725fc9f839d89521f1 /src/quick/scenegraph/qsgrhisupport.cpp
parent80835dbc832005ca4ee0d4c71fbfeccea64923e2 (diff)
Use QRhi by default
Flip it over and instead of having to do QSG_RHI=1 to enable, one can now do QSG_NO_RHI=1 to disable. (note that follow up patches are expected to break the direct GL path, so QSG_NO_RHI will likely not be useful in practice) Also clean up the unused rhi flag in the struct that is used by the C++ APIs like QQuickWindow::setSceneGraphBackend(). Disables the qquickwidget autotest since QQuickWidget is not functional at the moment. Also disables the 'zoom' case in the qqmlpreview test. No idea why the external process is crashing there. (and the infrastructure does not exactly make it easy to debug anything, hence postponing any further investigation) Task-number: QTBUG-79268 Change-Id: Ia877ebe039a1d98ce661add82a6822a313fd10e5 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgrhisupport.cpp')
-rw-r--r--src/quick/scenegraph/qsgrhisupport.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp
index 22a1827f72..ffc07a2791 100644
--- a/src/quick/scenegraph/qsgrhisupport.cpp
+++ b/src/quick/scenegraph/qsgrhisupport.cpp
@@ -126,7 +126,7 @@ void QSGRhiSupport::applySettings()
if (m_requested.valid) {
// explicit rhi backend request from C++ (e.g. via QQuickWindow)
- m_enableRhi = m_requested.rhi;
+ m_enableRhi = true;
switch (m_requested.api) {
case QSGRendererInterface::OpenGLRhi:
m_rhiBackend = QRhi::OpenGLES2;
@@ -148,8 +148,11 @@ void QSGRhiSupport::applySettings()
break;
}
} else {
+
+ // New Qt 6 default: enable RHI, unless QSG_NO_RHI is set
+ m_enableRhi = !qEnvironmentVariableIsSet("QSG_NO_RHI");
+
// check env.vars., fall back to platform-specific defaults when backend is not set
- m_enableRhi = uint(qEnvironmentVariableIntValue("QSG_RHI"));
const QByteArray rhiBackend = qgetenv("QSG_RHI_BACKEND");
if (rhiBackend == QByteArrayLiteral("gl")
|| rhiBackend == QByteArrayLiteral("gles2")
@@ -268,7 +271,6 @@ void QSGRhiSupport::configure(QSGRendererInterface::GraphicsApi api)
QSGRhiSupport *inst = staticInst();
inst->m_requested.valid = true;
inst->m_requested.api = api;
- inst->m_requested.rhi = true;
inst->applySettings();
}