diff options
author | Giulio Camuffo <giulio.camuffo@kdab.com> | 2020-03-16 10:22:36 +0100 |
---|---|---|
committer | Ratchanan Srirattanamet <ratchanan@ubports.com> | 2021-10-18 16:28:52 +0700 |
commit | 92a7904d9651348b0c307e84251c8440c6f75b22 (patch) | |
tree | 500e5fc24db82f1e470b22061725f0bcc238a306 /src/client/qwaylandwindow_p.h | |
parent | baa7ef511bf40280448e5f0e721ddd6da3301f3b (diff) | |
download | qtwayland-92a7904d9651348b0c307e84251c8440c6f75b22.tar.gz |
Move the wayland socket polling to a separate event thread
New event threads is introduced which calls poll() on the wayland fd,
instead of relying on the event dispatcher by using the QSocketNotifier.
This allows to call in the proper order the wl_display_prepare_read(),
poll() and wl_display_read_events() functions.
One thread is responsible for the default queue; when needed, it emit
a signal so that the main thread can dispatch the queue. Another thread
is responsible for the dedicated queue for frame callbacks; this thread
will dispatch events on the thread itself.
QWaylandWindow is updated to, instead of each window's dedicated event
queue, use this queue for frame callbacks.
Co-authored-by: Ratchanan Srirattanamet <ratchanan@ubports.com>
Task-number: QTBUG-66075
Change-Id: Ibb33ad7f4193b866d1b8d7a0405a94d59dcad5eb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/client/qwaylandwindow_p.h')
-rw-r--r-- | src/client/qwaylandwindow_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index a041dc40..17ed9fdc 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -274,7 +274,7 @@ protected: int mFrameCallbackCheckIntervalTimerId = -1; QElapsedTimer mFrameCallbackElapsedTimer; struct ::wl_callback *mFrameCallback = nullptr; - QWaylandDisplay::FrameQueue mFrameQueue; + QMutex mFrameSyncMutex; QWaitCondition mFrameSyncWait; // True when we have called deliverRequestUpdate, but the client has not yet attached a new buffer |