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-15 18:01:39 +0000 |
commit | 498016cb650b14a36d1392ba1ab421c574710315 (patch) | |
tree | 08e5f2ead3f1514b41a1d02299e4a0e88664fce6 | |
parent | cb572e9cc56556d00cd1e1de32e5d882d17c064e (diff) | |
download | qtwebengine-498016cb650b14a36d1392ba1ab421c574710315.tar.gz |
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 7aab704b9..c1507d3df 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]; |