summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2020-02-03 12:41:58 +0100
committerJüri Valdmann <juri.valdmann@qt.io>2020-02-03 12:41:58 +0100
commitc1c2c8d51005c5112dd1d5736b86f9d15c3eadcd (patch)
tree537db252b12351e057b8e2303862f92f1770c2e9 /src/core/web_engine_context.cpp
parenta6fb2c592bac997baf87016e9dd6b7a3c061ef3c (diff)
parentffc2fed113af6a7dde8f2e2ff4407281992d92d5 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r--src/core/web_engine_context.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 08e7f2b41..7ccd8ce8d 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -261,7 +261,7 @@ void WebEngineContext::destroy()
// Normally the GPU thread is shut down when the GpuProcessHost is destroyed
// on IO thread (triggered by ~BrowserMainRunner). But by that time the UI
// task runner is not working anymore so we need to do this earlier.
- destroyGpuProcess();
+ destroyGpuProcess(m_threadedGpu);
base::MessagePump::Delegate *delegate =
static_cast<base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl *>(
@@ -413,7 +413,8 @@ static void appendToFeatureSwitch(base::CommandLine *commandLine, const char *fe
}
WebEngineContext::WebEngineContext()
- : m_mainDelegate(new ContentMainDelegateQt)
+ : m_threadedGpu(true)
+ , m_mainDelegate(new ContentMainDelegateQt)
, m_globalQObject(new QObject())
{
#if defined(Q_OS_MACOS)
@@ -516,13 +517,12 @@ WebEngineContext::WebEngineContext()
parsedCommandLine->AppendSwitch(switches::kDisableES3GLContext);
#endif
- bool threadedGpu = true;
#ifndef QT_NO_OPENGL
- threadedGpu = QOpenGLContext::supportsThreadedOpenGL();
+ m_threadedGpu = QOpenGLContext::supportsThreadedOpenGL();
#endif
- threadedGpu = threadedGpu && !qEnvironmentVariableIsSet(kDisableInProcGpuThread);
+ m_threadedGpu = m_threadedGpu && !qEnvironmentVariableIsSet(kDisableInProcGpuThread);
- bool enableViz = ((threadedGpu && !parsedCommandLine->HasSwitch("disable-viz-display-compositor"))
+ bool enableViz = ((m_threadedGpu && !parsedCommandLine->HasSwitch("disable-viz-display-compositor"))
|| parsedCommandLine->HasSwitch("enable-viz-display-compositor"));
parsedCommandLine->RemoveSwitch("disable-viz-display-compositor");
parsedCommandLine->RemoveSwitch("enable-viz-display-compositor");
@@ -665,7 +665,7 @@ WebEngineContext::WebEngineContext()
parsedCommandLine->AppendSwitch(switches::kDisableGpu);
}
- registerMainThreadFactories(threadedGpu);
+ registerMainThreadFactories(m_threadedGpu);
SetContentClient(new ContentClientQt);