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:
parent
cf514c46a9
commit
6c3297a6f1
@ -58,11 +58,13 @@ QWaylandSubSurface::~QWaylandSubSurface()
|
|||||||
|
|
||||||
void QWaylandSubSurface::setSync()
|
void QWaylandSubSurface::setSync()
|
||||||
{
|
{
|
||||||
|
QMutexLocker l(&m_syncLock);
|
||||||
QWaylandSubSurface::set_sync();
|
QWaylandSubSurface::set_sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandSubSurface::setDeSync()
|
void QWaylandSubSurface::setDeSync()
|
||||||
{
|
{
|
||||||
|
QMutexLocker l(&m_syncLock);
|
||||||
QWaylandSubSurface::set_desync();
|
QWaylandSubSurface::set_desync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
|
#include <QtCore/qmutex.h>
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
#include <QtWaylandClient/private/qwayland-wayland.h>
|
#include <QtWaylandClient/private/qwayland-wayland.h>
|
||||||
@ -71,6 +72,7 @@ public:
|
|||||||
void setSync();
|
void setSync();
|
||||||
void setDeSync();
|
void setDeSync();
|
||||||
bool isSync() const { return m_synchronized; }
|
bool isSync() const { return m_synchronized; }
|
||||||
|
QMutex *syncMutex() { return &m_syncLock; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -81,6 +83,7 @@ private:
|
|||||||
QWaylandWindow *m_window;
|
QWaylandWindow *m_window;
|
||||||
QWaylandWindow *m_parent;
|
QWaylandWindow *m_parent;
|
||||||
bool m_synchronized;
|
bool m_synchronized;
|
||||||
|
QMutex m_syncLock;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user