summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-09-14 14:43:52 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-15 13:03:25 +0000
commit6d6e296edc73dd143d2cb12df8f3602b97ab330e (patch)
tree7c36cdab5ab5135d090cdc7ee788298b929fabdc
parentbdeb81b73122d6962ca4796c573dcbc636ccb195 (diff)
Don't pass kInProcessGPU if we pass kDisableGPU
The in process GPU thread still starts even if kDisableGPU is passed because kInProcessGPU check has a higher priority in GpuDataManagerImplPrivate::GpuAccessAllowed(). This caused a crash when running on Windows with ANGLE. Make sure not to pass kInProcessGPU if we will disable the GPU. Task-number: QTBUG-63221 Change-Id: I8f9d154951e9143c7b5049eb641bfad2448b855b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/core/web_engine_context.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 83b7c2d36..06795a57f 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -323,7 +323,6 @@ WebEngineContext::WebEngineContext()
}
parsedCommandLine->AppendSwitch(switches::kEnableThreadedCompositing);
- parsedCommandLine->AppendSwitch(switches::kInProcessGPU);
// These are currently only default on OS X, and we don't support them:
parsedCommandLine->AppendSwitch(switches::kDisableZeroCopy);
parsedCommandLine->AppendSwitch(switches::kDisableGpuMemoryBufferCompositorResources);
@@ -451,10 +450,12 @@ WebEngineContext::WebEngineContext()
}
#endif
- if (glType)
+ if (glType) {
parsedCommandLine->AppendSwitchASCII(switches::kUseGL, glType);
- else
+ parsedCommandLine->AppendSwitch(switches::kInProcessGPU);
+ } else {
parsedCommandLine->AppendSwitch(switches::kDisableGpu);
+ }
content::UtilityProcessHostImpl::RegisterUtilityMainThreadFactory(content::CreateInProcessUtilityThread);
content::RenderProcessHostImpl::RegisterRendererMainThreadFactory(content::CreateInProcessRendererThread);