diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-17 13:06:23 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-17 17:42:04 +0200 |
commit | 66b4321cd13412b93f1f4e8a8f3e238ce99f9e63 (patch) | |
tree | 26e128f12da42ed8c346b7af6b574b4fd8f2d5bc /src/quick/scenegraph | |
parent | a86febf876f85d1b460463aa48ff8b319285f7ba (diff) |
Add "rhi" as an accepted scenegraph backend name
Change-Id: Ic0f1a1ffe18aa12cdf6643e52644053f4d191380
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/qsgcontextplugin.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index ed054f3aa0..45ecb2009b 100644 --- a/src/quick/scenegraph/qsgcontextplugin.cpp +++ b/src/quick/scenegraph/qsgcontextplugin.cpp @@ -137,10 +137,17 @@ QSGAdaptationBackendData *contextFactory() // default to the software renderer #if !QT_CONFIG(vulkan) && !defined(Q_OS_WIN) && !defined(Q_OS_MACOS) && !defined(Q_OS_IOS) if (requestedBackend.isEmpty() - && !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) { - requestedBackend = QString::fromLocal8Bit("software"); + && !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) + { + requestedBackend = QLatin1String("software"); } #endif + + // This is handy if some of the logic above goes wrong and we select + // e.g. the software backend when it is not desired. + if (requestedBackend == QLatin1String("rhi")) + requestedBackend.clear(); // empty = no custom backend to load + if (!requestedBackend.isEmpty()) { qCDebug(QSG_LOG_INFO, "Loading backend %s", qUtf8Printable(requestedBackend)); |