summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueueProducer.cpp
diff options
context:
space:
mode:
author android-build-team Robot <android-build-team-robot@google.com> 2019-07-13 23:11:13 +0000
committer android-build-team Robot <android-build-team-robot@google.com> 2019-07-13 23:11:13 +0000
commit443e14b40b87c7dba37ca8373406dc195a3ac4ef (patch)
tree50c3e48eb79562e6cd8d82419ef9e2a1cc01bbec /libs/gui/BufferQueueProducer.cpp
parent0c4a70fed471fda4330b1f250e0051451a27bc3d (diff)
parent5119d1adf3062d9380bdf3f08d32af34b26c5021 (diff)
Snap for 5726890 from 5119d1adf3062d9380bdf3f08d32af34b26c5021 to qt-c2f2-release
Change-Id: Iebc8d56ecbf36dd787b5b7ce5086be5d09b22a56
Diffstat (limited to 'libs/gui/BufferQueueProducer.cpp')
-rw-r--r--libs/gui/BufferQueueProducer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp
index 9c311a314f..92ab41019e 100644
--- a/libs/gui/BufferQueueProducer.cpp
+++ b/libs/gui/BufferQueueProducer.cpp
@@ -936,6 +936,15 @@ status_t BufferQueueProducer::queueBuffer(int slot,
}
}
+ // Make sure to merge the damage rect from the frame we're about
+ // to drop into the new frame's damage rect.
+ if (last.mSurfaceDamage.bounds() == Rect::INVALID_RECT ||
+ item.mSurfaceDamage.bounds() == Rect::INVALID_RECT) {
+ item.mSurfaceDamage = Region::INVALID_REGION;
+ } else {
+ item.mSurfaceDamage |= last.mSurfaceDamage;
+ }
+
// Overwrite the droppable buffer with the incoming one
mCore->mQueue.editItemAt(mCore->mQueue.size() - 1) = item;
frameReplacedListener = mCore->mConsumerListener;