summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandsurface.h
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2015-03-19 10:52:03 +0200
committerGiulio Camuffo <giulio.camuffo@jollamobile.com>2015-07-15 07:09:55 +0000
commit6c47babc1a3566c7186e3196e7975df2be9b575b (patch)
tree9fce1d93e02d48346ffa1ecfeebbc8a6adf4ef62 /src/compositor/compositor_api/qwaylandsurface.h
parentab3b7de2405f92cd01efb8a7717a4924c7630d5f (diff)
Add a mechanism to delay unmapping of surfaces
When a client attachs a NULL buffer on a surface we may want to hang on to the old buffer for a bit, e.g. to do a hide animation. Add the QWaylandUnmapLock class to keep a surface mapped after an attach(0) request. Change-Id: I5d5be0b36410a76a58d2b68c1b2ac5e3b875a801 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/compositor/compositor_api/qwaylandsurface.h')
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurface.h b/src/compositor/compositor_api/qwaylandsurface.h
index 653d74c1b..db1e1fb44 100644
--- a/src/compositor/compositor_api/qwaylandsurface.h
+++ b/src/compositor/compositor_api/qwaylandsurface.h
@@ -77,6 +77,7 @@ public:
protected:
virtual void attach(const QWaylandBufferRef &ref) = 0;
+ virtual void unmap() = 0;
friend class QtWayland::Surface;
};
@@ -261,6 +262,17 @@ Q_SIGNALS:
friend class QtWayland::Surface;
};
+class QWaylandUnmapLockPrivate;
+class Q_COMPOSITOR_EXPORT QWaylandUnmapLock
+{
+public:
+ QWaylandUnmapLock(QWaylandSurface *surface);
+ ~QWaylandUnmapLock();
+
+private:
+ QWaylandUnmapLockPrivate *const d;
+};
+
QT_END_NAMESPACE
#endif // QWAYLANDSURFACE_H