From 6d7df67a75ce1a71c1a248d56dfbfab1d9225980 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 15 Sep 2017 09:22:34 +0200 Subject: [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 --- src/core/web_engine_context.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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); } -- cgit v1.2.3