diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-09-15 09:22:34 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-09-16 16:26:39 +0000 |
commit | 6d7df67a75ce1a71c1a248d56dfbfab1d9225980 (patch) | |
tree | 02fcf04bae6ca5caaf4206f9d6296a98bd856dac | |
parent | 4f9c1f0ba4709500933fab86e9c34b4626dffecc (diff) |
[Windows] Disable GPU rasterization when using software WebGL
This should improve the CPU usage a bit, due to using software
rasterization in Chromium, rather than relying on the mesa
implementation in opengl32sw.dll.
Change-Id: Ib165aacc6a9d02dd30a6397e48af5616e00eb574
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | src/core/web_engine_context.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 06795a57f..2339537aa 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -287,8 +287,10 @@ 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) @@ -453,6 +455,10 @@ WebEngineContext::WebEngineContext() if (glType) { parsedCommandLine->AppendSwitchASCII(switches::kUseGL, glType); parsedCommandLine->AppendSwitch(switches::kInProcessGPU); +#ifdef Q_OS_WIN + if (enableWebGLSoftwareRendering) + parsedCommandLine->AppendSwitch(switches::kDisableGpuRasterization); +#endif } else { parsedCommandLine->AppendSwitch(switches::kDisableGpu); } |