diff options
author | Mikko Levonmaa <mikko.levonmaa@lge.com> | 2015-11-10 14:46:26 +0200 |
---|---|---|
committer | Mikko Levonmaa <mikko.levonmaa@bitfactor.fi> | 2015-11-12 06:41:18 +0000 |
commit | 7963e85b771852f96a923839cd0530219676914e (patch) | |
tree | 61df438b04210a1fbd2953bc2b12ab6bd2919ab3 /src/client | |
parent | 2eff05fe14c910c8b2cade8674e49404c6843e74 (diff) |
Make swap buffer call non-blocking for subsurfaces
Allows clients that use subsurfaces in synchronized mode to continue
processing the event loop even in cases where a frame callback is not
delivered from the compositor pending a parent surface commit
Change-Id: I7df38afc4080546b60184dacecde321ba8062fac
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/qwaylandsubsurface.cpp | 2 | ||||
-rw-r--r-- | src/client/qwaylandsubsurface_p.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/client/qwaylandsubsurface.cpp b/src/client/qwaylandsubsurface.cpp index 72b80c18f..eac847c75 100644 --- a/src/client/qwaylandsubsurface.cpp +++ b/src/client/qwaylandsubsurface.cpp @@ -58,11 +58,13 @@ QWaylandSubSurface::~QWaylandSubSurface() void QWaylandSubSurface::setSync() { + QMutexLocker l(&m_syncLock); QWaylandSubSurface::set_sync(); } void QWaylandSubSurface::setDeSync() { + QMutexLocker l(&m_syncLock); QWaylandSubSurface::set_desync(); } diff --git a/src/client/qwaylandsubsurface_p.h b/src/client/qwaylandsubsurface_p.h index 5255df5c9..b8ea6aaf3 100644 --- a/src/client/qwaylandsubsurface_p.h +++ b/src/client/qwaylandsubsurface_p.h @@ -48,6 +48,7 @@ #include <wayland-client.h> #include <QtCore/qglobal.h> +#include <QtCore/qmutex.h> #include <QtWaylandClient/private/qwaylandclientexport_p.h> #include <QtWaylandClient/private/qwayland-wayland.h> @@ -71,6 +72,7 @@ public: void setSync(); void setDeSync(); bool isSync() const { return m_synchronized; } + QMutex *syncMutex() { return &m_syncLock; } private: @@ -81,6 +83,7 @@ private: QWaylandWindow *m_window; QWaylandWindow *m_parent; bool m_synchronized; + QMutex m_syncLock; }; |