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>
This commit is contained in:
Mikko Levonmaa 2015-11-10 14:46:26 +02:00 committed by Mikko Levonmaa
parent cf514c46a9
commit 6c3297a6f1
2 changed files with 5 additions and 0 deletions

View File

@ -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();
}

View File

@ -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;
};