summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context_threads.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Follow InProcessGpuThread::Init() on thread priorityAllan Sandfeld Jensen2021-05-101-1/+1
| | | | | | | If they use NORMAL, then we should too. Change-Id: I252b4606c692ba483434c126fcda3a7484f399e2 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Fix ScopedGLContextChecker with QTWEBENGINE_DISABLE_GPU_THREAD=1Jüri Valdmann2020-08-261-2/+2
| | | | | | | | | | | | 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)
* Merge remote-tracking branch 'origin/5.14.2' into 5.15Allan Sandfeld Jensen2020-03-051-17/+1
|\ | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/web_engine_context.cpp Change-Id: Ib02d0e50124917b1b09e528e5ec8570c25a94051
| * Fix deadlocks on WebEngineContext destructionMichal Klocek2020-03-021-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch aims to handle 3 deadlocks on exit: (1) Do not attempt to restart Viz thread on shutdown, this will make deadlock with no separate gpu thread, since force shut down of FrameSinkManager requires interaction with gpu process. (2) QCoreApplication, QGuiApplication, QApplication behave differently when doing qt post routine, ~QGuiApplication calls the post routine handler after closing event dispatcher, which will on windows stop processing timer events, which we need to pump message loop when shuting down viz. Do not use QEventLoop and switch to active pulling. The proper solution is to fix QGuiApplication destructor to call post routine first, but this change might have side effects on already existing user code. (3) Since 7f1649b438329e we delete root frame sink asynchronously, which will in gpu thread running in separate thread create a deadlock. Viz requires gpu to destruct root frame sink, however if main process tries to close gpu process this will in turn try close viz, but viz calls back gpu now since the root frame sink is not destroyed. Use the same solution as in (1). Change-Id: Ic6bc904bdac90ee01a5c5b9398a2e2746be3bbd8 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Adaptations for Chromium 78Allan Sandfeld Jensen2020-02-281-2/+2
|/ | | | | | | | | | Including removal of renderer service. [ChangeLog][QWebEngineSetting] XSS Auditing has been removed, and XSSAuditingEnabled no longer has any effect. Change-Id: I0835e2a76551057f3eea30a343e0373b642192f0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Cleanup FrameSinkManagerImpl before shutting down GPU serviceJüri Valdmann2020-01-301-1/+19
| | | | | | | | | | | | | | | 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>
* Set correct priorities on tasks and threadsAllan Sandfeld Jensen2019-04-101-1/+1
| | | | | Change-Id: I1dc8b466d0b45f9e1d6c973f1ad3c62033bf4409 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Adaptations for Chromium 73Allan Sandfeld Jensen2019-03-231-0/+1
| | | | | Change-Id: I565d1e327852110a5abebed3388d7cd6986bef06 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for Chromium 71Allan Sandfeld Jensen2019-01-281-4/+7
| | | | | | | Change-Id: Ib650113b05dfd4771240804f94e33c07aa317bf2 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Move thread setup out of the web_engine_context.cppAllan Sandfeld Jensen2018-11-161-0/+132
This helps avoid conflicts between Qt and Chromium OpenGL headers. Change-Id: Ib77d0d985397ef2b9792b26df4bec69bbfbe4611 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>