summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandview.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@theqtcompany.com>2015-08-06 13:41:27 +0200
committerJørgen Lind <jorgen.lind@theqtcompany.com>2015-08-28 13:10:32 +0200
commitfd9a8983832bbeb240097327ff9f8565f7356b08 (patch)
treedb359b31c502694b3c33e451825fda7257c31bc1 /src/compositor/compositor_api/qwaylandview.cpp
parente6a44555c60859fd61a6cc78140a36fa36e7b9f5 (diff)
Fixups after rebasing
Diffstat (limited to 'src/compositor/compositor_api/qwaylandview.cpp')
-rw-r--r--src/compositor/compositor_api/qwaylandview.cpp16
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);