From dea335f03ac4ce0a28cb75be76b598727b073ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Fri, 18 Sep 2015 12:32:26 +0200 Subject: Add a DiscardFontBuffers property to QWaylandView This is an optimisation property which can be set on a view. If you have two views for a surface, then the frontBuffer will be released first when the last view has released the frontBuffer. With this option all views with this option set to true will discard the frontBuffer when the throtlingView discards its frontbuffer Change-Id: Id628ec60830549ea930c1fff950501de2b073e48 Reviewed-by: Paul Olav Tvete --- src/compositor/compositor_api/qwaylandview.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/compositor/compositor_api/qwaylandview.h') diff --git a/src/compositor/compositor_api/qwaylandview.h b/src/compositor/compositor_api/qwaylandview.h index 7eba0c809..5a820fb50 100644 --- a/src/compositor/compositor_api/qwaylandview.h +++ b/src/compositor/compositor_api/qwaylandview.h @@ -57,6 +57,7 @@ class Q_COMPOSITOR_EXPORT QWaylandView : public QObject Q_PROPERTY(QWaylandSurface *surface READ surface WRITE setSurface NOTIFY surfaceChanged) Q_PROPERTY(QWaylandOutput *output READ output WRITE setOutput NOTIFY outputChanged) Q_PROPERTY(bool bufferLock READ isBufferLocked WRITE setBufferLock NOTIFY bufferLockChanged) + Q_PROPERTY(bool discardFrontBuffers READ discardFrontBuffers WRITE setDiscardFrontBuffers NOTIFY discardFrontBuffersChanged) public: QWaylandView(QObject *renderObject = 0, QObject *parent = 0); virtual ~QWaylandView(); @@ -78,6 +79,9 @@ public: bool isBufferLocked() const; void setBufferLock(bool locked); + bool discardFrontBuffers() const; + void setDiscardFrontBuffers(bool discard); + struct wl_resource *surfaceResource() const; Q_SIGNALS: @@ -85,6 +89,7 @@ Q_SIGNALS: void surfaceDestroyed(); void outputChanged(); void bufferLockChanged(); + void discardFrontBuffersChanged(); }; QT_END_NAMESPACE -- cgit v1.2.3