diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2020-01-16 11:51:23 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-30 13:40:04 +0100 |
commit | 7f1649b438329ec4f698389bbc44ee8d694e4801 (patch) | |
tree | 6dffd749ee94f8d488ad2eccda2d58c9fc8040c4 /src/core/web_engine_context.h | |
parent | 97b047203345474cc9733f801cc5a447040bcea5 (diff) |
Cleanup FrameSinkManagerImpl before shutting down GPU service
We changed RootCompositorFrameSinks to be destroyed asynchronously (in
HostFrameSinkManager::InvalidateFrameSinkId) which means that one can still
exist during shutdown in GpuThreadControllerQt::destroyGpuProcess. This results
in a deadlock in single threaded GPU mode: in destroyGpuProcess we wait for the
viz thread to exit, but the FrameSinkManagerImpl on the viz thread will try to
destroy the RootCompositorFrameSink, which waits for work to be done on the
GPU=UI thread, which is waiting for the viz thread to exit.
Fix by destroying all RootCompositorFrameSinks before destroyGpuProcess.
Change-Id: I4cf135f29b90ae0bf78525d5747567dc10a775e6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_engine_context.h')
-rw-r--r-- | src/core/web_engine_context.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h index ac0536596..edced9b42 100644 --- a/src/core/web_engine_context.h +++ b/src/core/web_engine_context.h @@ -129,8 +129,9 @@ private: ~WebEngineContext(); static void registerMainThreadFactories(bool threaded); - static void destroyGpuProcess(); + static void destroyGpuProcess(bool threaded); + bool m_threadedGpu; std::unique_ptr<base::RunLoop> m_runLoop; std::unique_ptr<ContentMainDelegateQt> m_mainDelegate; std::unique_ptr<content::ContentMainRunner> m_contentRunner; |