diff options
author | Michal Klocek <michal.klocek@qt.io> | 2022-09-01 09:33:28 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-09-20 05:10:16 +0000 |
commit | fe01e56d5592dc8b5fe36bd682a884db5b00d294 (patch) | |
tree | 5ed1d876c90f7d57b633a87c3335819549653f29 | |
parent | 4b14d09b49d6a2b390e9783b9c8138048fd2c970 (diff) |
Check QT_OPENGL for software
According to qt docs this variable should have
same effect like setting Qt::AA_UseSoftwareOpenGL on
application, therefore read that in case of detecting
the software mode.
Task-number: QTBUG-106095
Change-Id: I00fa8f0607ca44533c445434d1a35a1524bab679
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit fd1e82d0c09c73e42f172ffdf7edbcc952232155)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/core/web_engine_context.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index d380becbd..1ec30e984 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -148,8 +148,15 @@ static bool usingSupportedSGBackend() bool usingSoftwareDynamicGL() { + const char openGlVar[] = "QT_OPENGL"; if (QCoreApplication::testAttribute(Qt::AA_UseSoftwareOpenGL)) return true; + + if (qEnvironmentVariableIsSet(openGlVar)) { + const QByteArray requested = qgetenv(openGlVar); + if (requested == "software") + return true; + } #if defined(Q_OS_WIN) HMODULE handle = QNativeInterface::QWGLContext::openGLModuleHandle(); wchar_t path[MAX_PATH]; |