diff options
Diffstat (limited to 'libs/gui/BufferQueueProducer.cpp')
-rw-r--r-- | libs/gui/BufferQueueProducer.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp index 70c3ff3..6feebf7 100644 --- a/libs/gui/BufferQueueProducer.cpp +++ b/libs/gui/BufferQueueProducer.cpp @@ -37,7 +37,8 @@ namespace android { BufferQueueProducer::BufferQueueProducer(const sp<BufferQueueCore>& core) : mCore(core), mSlots(core->mSlots), - mConsumerName() {} + mConsumerName(), + mStickyTransform(0) {} BufferQueueProducer::~BufferQueueProducer() {} @@ -509,10 +510,11 @@ status_t BufferQueueProducer::queueBuffer(int slot, Rect crop; int scalingMode; uint32_t transform; + uint32_t stickyTransform; bool async; sp<Fence> fence; input.deflate(×tamp, &isAutoTimestamp, &crop, &scalingMode, &transform, - &async, &fence); + &async, &fence, &stickyTransform); if (fence == NULL) { BQ_LOGE("queueBuffer: fence is NULL"); @@ -601,6 +603,8 @@ status_t BufferQueueProducer::queueBuffer(int slot, item.mFence = fence; item.mIsDroppable = mCore->mDequeueBufferCannotBlock || async; + mStickyTransform = stickyTransform; + if (mCore->mQueue.empty()) { // When the queue is empty, we can ignore mDequeueBufferCannotBlock // and simply queue this buffer @@ -701,6 +705,9 @@ int BufferQueueProducer::query(int what, int *outValue) { case NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS: value = mCore->getMinUndequeuedBufferCountLocked(false); break; + case NATIVE_WINDOW_STICKY_TRANSFORM: + value = static_cast<int>(mStickyTransform); + break; case NATIVE_WINDOW_CONSUMER_RUNNING_BEHIND: value = (mCore->mQueue.size() > 1); break; |