diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-04-07 21:05:56 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-04-07 21:05:56 +0000 |
commit | 78a11714dc12c6324584478b6e408b0290fe2377 (patch) | |
tree | d45c31ddb5eee3463303057810a30b927e269a12 | |
parent | bbd1669c43461913270b53ffb471b8d2ea77f4cb (diff) | |
parent | 94c1d740cfe001e5faf62d3c447c4e1e9f4aa325 (diff) | |
download | native-78a11714dc12c6324584478b6e408b0290fe2377.tar.gz |
Snap for 5443865 from 94c1d740cfe001e5faf62d3c447c4e1e9f4aa325 to pi-qpr3-b-release
Change-Id: If6fae3356fb3156b091b246657da366740b1899b
-rw-r--r-- | libs/gui/BufferQueueCore.cpp | 1 | ||||
-rw-r--r-- | libs/gui/BufferQueueProducer.cpp | 16 | ||||
-rw-r--r-- | libs/gui/include/gui/BufferQueueCore.h | 5 | ||||
-rw-r--r-- | libs/gui/include/gui/IGraphicBufferProducer.h | 4 |
4 files changed, 5 insertions, 21 deletions
diff --git a/libs/gui/BufferQueueCore.cpp b/libs/gui/BufferQueueCore.cpp index 7dddd8b2c4..bb703da3dd 100644 --- a/libs/gui/BufferQueueCore.cpp +++ b/libs/gui/BufferQueueCore.cpp @@ -73,7 +73,6 @@ BufferQueueCore::BufferQueueCore() : mActiveBuffers(), mDequeueCondition(), mDequeueBufferCannotBlock(false), - mQueueBufferCanDrop(false), mDefaultBufferFormat(PIXEL_FORMAT_RGBA_8888), mDefaultWidth(1), mDefaultHeight(1), diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp index c01b2b6598..c96a2dd6a3 100644 --- a/libs/gui/BufferQueueProducer.cpp +++ b/libs/gui/BufferQueueProducer.cpp @@ -872,7 +872,7 @@ status_t BufferQueueProducer::queueBuffer(int slot, item.mFence = acquireFence; item.mFenceTime = acquireFenceTime; item.mIsDroppable = mCore->mAsyncMode || - mCore->mQueueBufferCanDrop || + mCore->mDequeueBufferCannotBlock || (mCore->mSharedBufferMode && mCore->mSharedBufferSlot == slot); item.mSurfaceDamage = surfaceDamage; item.mQueuedBuffer = true; @@ -1213,10 +1213,9 @@ status_t BufferQueueProducer::connect(const sp<IProducerListener>& listener, mCore->mConnectedPid = IPCThreadState::self()->getCallingPid(); mCore->mBufferHasBeenQueued = false; mCore->mDequeueBufferCannotBlock = false; - mCore->mQueueBufferCanDrop = false; - if (mCore->mConsumerControlledByApp && producerControlledByApp) { - mCore->mDequeueBufferCannotBlock = mDequeueTimeout < 0; - mCore->mQueueBufferCanDrop = mDequeueTimeout <= 0; + if (mDequeueTimeout < 0) { + mCore->mDequeueBufferCannotBlock = + mCore->mConsumerControlledByApp && producerControlledByApp; } mCore->mAllowAllocation = true; @@ -1487,12 +1486,7 @@ status_t BufferQueueProducer::setDequeueTimeout(nsecs_t timeout) { } mDequeueTimeout = timeout; - if (timeout >= 0) { - mCore->mDequeueBufferCannotBlock = false; - if (timeout != 0) { - mCore->mQueueBufferCanDrop = false; - } - } + mCore->mDequeueBufferCannotBlock = false; VALIDATE_CONSISTENCY(); return NO_ERROR; diff --git a/libs/gui/include/gui/BufferQueueCore.h b/libs/gui/include/gui/BufferQueueCore.h index f91babca11..537c957746 100644 --- a/libs/gui/include/gui/BufferQueueCore.h +++ b/libs/gui/include/gui/BufferQueueCore.h @@ -225,11 +225,6 @@ private: // consumer are controlled by the application. bool mDequeueBufferCannotBlock; - // mQueueBufferCanDrop indicates whether queueBuffer is allowd to drop - // buffers in non-async mode. This flag is set during connect when both the - // producer and consumer are controlled by application. - bool mQueueBufferCanDrop; - // mDefaultBufferFormat can be set so it will override the buffer format // when it isn't specified in dequeueBuffer. PixelFormat mDefaultBufferFormat; diff --git a/libs/gui/include/gui/IGraphicBufferProducer.h b/libs/gui/include/gui/IGraphicBufferProducer.h index 2f8a154faa..887654e05b 100644 --- a/libs/gui/include/gui/IGraphicBufferProducer.h +++ b/libs/gui/include/gui/IGraphicBufferProducer.h @@ -584,10 +584,6 @@ public: // non-blocking mode and its corresponding spare buffer (which is used to // ensure a buffer is always available). // - // N.B. queueBuffer will stop buffer dropping behavior if timeout is - // strictly positive. If timeout is zero or negative, previous buffer - // dropping behavior will not be changed. - // // Return of a value other than NO_ERROR means an error has occurred: // * BAD_VALUE - Failure to adjust the number of available slots. This can // happen because of trying to allocate/deallocate the async |