From 6d6e296edc73dd143d2cb12df8f3602b97ab330e Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 14 Sep 2017 14:43:52 +0200 Subject: 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 --- src/core/web_engine_context.cpp | 7 ++++--- 1 file 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); -- cgit v1.2.3