summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context_threads.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2020-06-26 13:24:01 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2020-08-26 13:18:46 +0200
commit7aa99d8d5b0dbf024019e70bf39b7d15796e1080 (patch)
tree643f2eb8c185c06263f76f6119248d71dc2f43a9 /src/core/web_engine_context_threads.cpp
parent6deddc5ecd6155c567aecd0338c53c63fa465bfd (diff)
Fix ScopedGLContextChecker with QTWEBENGINE_DISABLE_GPU_THREAD=1
The ScopedGLContextChecker, which deactivates the current QOpenGLContext when executing Chromium tasks, is currently enabled only if QOpenGLContext::supportsThreadedOpenGL() is false. But the gpu thread can nowadays be disabled also with an environment variable and ScopedGLContextChecker needs to take this into account. Change-Id: I012524538b49b033ed053dbc41ed4350db916542 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 5988cec1a1b59aa163042a419c4c2e978bb814bb)
Diffstat (limited to 'src/core/web_engine_context_threads.cpp')
-rw-r--r--src/core/web_engine_context_threads.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/web_engine_context_threads.cpp b/src/core/web_engine_context_threads.cpp
index ba3e18499..5f9e345f7 100644
--- a/src/core/web_engine_context_threads.cpp
+++ b/src/core/web_engine_context_threads.cpp
@@ -125,11 +125,11 @@ void WebEngineContext::destroyGpuProcess()
}
// static
-void WebEngineContext::registerMainThreadFactories(bool threaded)
+void WebEngineContext::registerMainThreadFactories()
{
content::UtilityProcessHost::RegisterUtilityMainThreadFactory(content::CreateInProcessUtilityThread);
content::RenderProcessHostImpl::RegisterRendererMainThreadFactory(content::CreateInProcessRendererThread);
- if (threaded)
+ if (!isGpuServiceOnUIThread())
content::RegisterGpuMainThreadFactory(content::CreateInProcessGpuThread);
else
content::RegisterGpuMainThreadFactory(createGpuThreadController);