From 5988cec1a1b59aa163042a419c4c2e978bb814bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Fri, 26 Jun 2020 13:24:01 +0200 Subject: 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 --- src/core/web_engine_context.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/web_engine_context.h') diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h index 6cbd5c8e5..e2190f8a2 100644 --- a/src/core/web_engine_context.h +++ b/src/core/web_engine_context.h @@ -123,13 +123,15 @@ public: static gpu::SyncPointManager *syncPointManager(); + static bool isGpuServiceOnUIThread(); + private: friend class base::RefCounted; friend class ProfileAdapter; WebEngineContext(); ~WebEngineContext(); - static void registerMainThreadFactories(bool threaded); + static void registerMainThreadFactories(); static void destroyGpuProcess(); std::unique_ptr m_runLoop; -- cgit v1.2.3