summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-10-23 14:43:39 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-11-01 15:49:11 +0000
commit6e3aaa4b22892fd1fecdb9cf6c6e96296c13844a (patch)
tree56c7262749702b22b4bae63330698387148d6123 /src/core/web_engine_context.cpp
parent1f90c16845dfda2639712354ded1121b5c999ef3 (diff)
Allow --enable-webgl-software-rendering outside Windows
While less useful, it still makes sense occasionally on other platform, if software OpenGL is used. At least for testing. Change-Id: I1371674aec58b4e9e4f848ab353d04a896137973 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r--src/core/web_engine_context.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index fefccae0e..62ed3c2fd 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -354,10 +354,8 @@ WebEngineContext::WebEngineContext()
appArgs.append(QString::fromLocal8Bit(qgetenv(kChromiumFlagsEnv)).split(' '));
}
-#ifdef Q_OS_WIN
bool enableWebGLSoftwareRendering =
appArgs.removeAll(QStringLiteral("--enable-webgl-software-rendering"));
-#endif
bool useEmbeddedSwitches = false;
#if defined(QTWEBENGINE_EMBEDDED_SWITCHES)
@@ -452,12 +450,10 @@ WebEngineContext::WebEngineContext()
bool tryGL =
!usingANGLE()
&& (!usingSoftwareDynamicGL()
-#ifdef Q_OS_WIN
- // If user requested WebGL support on Windows, instead of using Skia rendering to
- // bitmaps, use software rendering via opengl32sw.dll. This might be less
+ // If user requested WebGL support instead of using Skia rendering to
+ // bitmaps, use software rendering via software OpenGL. This might be less
// performant, but at least provides WebGL support.
|| enableWebGLSoftwareRendering
-#endif
)
&& !usingQtQuick2DRenderer();
@@ -524,12 +520,10 @@ WebEngineContext::WebEngineContext()
if (glType) {
parsedCommandLine->AppendSwitchASCII(switches::kUseGL, glType);
parsedCommandLine->AppendSwitch(switches::kInProcessGPU);
-#ifdef Q_OS_WIN
if (enableWebGLSoftwareRendering) {
parsedCommandLine->AppendSwitch(switches::kDisableGpuRasterization);
parsedCommandLine->AppendSwitch(switches::kIgnoreGpuBlacklist);
}
-#endif
} else {
parsedCommandLine->AppendSwitch(switches::kDisableGpu);
}