diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-06 13:41:27 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 13:10:32 +0200 |
commit | fd9a8983832bbeb240097327ff9f8565f7356b08 (patch) | |
tree | db359b31c502694b3c33e451825fda7257c31bc1 /src/compositor/compositor_api/qwaylandview.cpp | |
parent | e6a44555c60859fd61a6cc78140a36fa36e7b9f5 (diff) |
Fixups after rebasing
Change-Id: Ie5d8899157d77f83f2cf65f236d534b972aa4770
Diffstat (limited to 'src/compositor/compositor_api/qwaylandview.cpp')
-rw-r--r-- | src/compositor/compositor_api/qwaylandview.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/compositor/compositor_api/qwaylandview.cpp b/src/compositor/compositor_api/qwaylandview.cpp index 81c199964..1a64b73ee 100644 --- a/src/compositor/compositor_api/qwaylandview.cpp +++ b/src/compositor/compositor_api/qwaylandview.cpp @@ -104,10 +104,13 @@ void QWaylandView::setSurface(QWaylandSurface *newSurface) QWaylandSurfacePrivate::get(newSurface)->refView(this); waylandSurfaceChanged(newSurface, oldSurface); - if (!d->lockedBuffer) + if (!d->lockedBuffer) { d->currentBuffer = QWaylandBufferRef(); + d->currentDamage = QRegion(); + } d->nextBuffer = QWaylandBufferRef(); + d->nextDamage = QRegion(); } QWaylandOutput *QWaylandView::output() const @@ -157,11 +160,12 @@ QPointF QWaylandView::pos() const return d->requestedPos; } -void QWaylandView::attach(const QWaylandBufferRef &ref) +void QWaylandView::attach(const QWaylandBufferRef &ref, const QRegion &damage) { Q_D(QWaylandView); QMutexLocker locker(&d->bufferMutex); d->nextBuffer = ref; + d->nextDamage = damage; } bool QWaylandView::advance() @@ -175,6 +179,7 @@ bool QWaylandView::advance() QMutexLocker locker(&d->bufferMutex); d->currentBuffer = d->nextBuffer; + d->currentDamage = d->nextDamage; return true; } @@ -185,6 +190,13 @@ QWaylandBufferRef QWaylandView::currentBuffer() return d->currentBuffer; } +QRegion QWaylandView::currentDamage() +{ + Q_D(QWaylandView); + QMutexLocker locker(&d->bufferMutex); + return d->currentDamage; +} + bool QWaylandView::lockedBuffer() const { Q_D(const QWaylandView); |