diff options
author | 2019-04-30 18:24:05 -0700 | |
---|---|---|
committer | 2019-05-06 17:55:25 -0700 | |
commit | 485e4c358b26f09ec0634e63c311131c9507779a (patch) | |
tree | 08a623a6f2942a359a5a785290b7f7c4a7e00e70 /libs/gui/BufferQueueProducer.cpp | |
parent | e6f6a7c4d74c967c4ea38f2f6b7c68f9260c952c (diff) |
Clean-up egl image preallocation
Allocate EGL images in onFrameAvailable, instead of a custom
onBuffersAllocated callback. This way we reduce traffic over binder
while still performing GL work ahead of time in queueBuffer().
Bug: 130567928
Test: systrace
Change-Id: I4070e9ddbd379dac3d809d0e7edb2855fc8b7a80
Diffstat (limited to 'libs/gui/BufferQueueProducer.cpp')
-rw-r--r-- | libs/gui/BufferQueueProducer.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp index c94c6b31c6..3928bb9e40 100644 --- a/libs/gui/BufferQueueProducer.cpp +++ b/libs/gui/BufferQueueProducer.cpp @@ -539,13 +539,6 @@ status_t BufferQueueProducer::dequeueBuffer(int* outSlot, sp<android::Fence>* ou return NO_INIT; } - if (mCore->mConsumerListener != nullptr) { - BufferItem item; - item.mGraphicBuffer = graphicBuffer; - item.mSlot = *outSlot; - mCore->mConsumerListener->onBufferAllocated(item); - } - VALIDATE_CONSISTENCY(); } // Autolock scope } @@ -975,9 +968,6 @@ status_t BufferQueueProducer::queueBuffer(int slot, item.mGraphicBuffer.clear(); } - // Don't send the slot number through the callback since the consumer shouldn't need it - item.mSlot = BufferItem::INVALID_BUFFER_SLOT; - // Call back without the main BufferQueue lock held, but with the callback // lock held so we can ensure that callbacks occur in order @@ -1433,13 +1423,6 @@ void BufferQueueProducer::allocateBuffers(uint32_t width, uint32_t height, BQ_LOGV("allocateBuffers: allocated a new buffer in slot %d", *slot); - if (mCore->mConsumerListener != nullptr) { - BufferItem item; - item.mGraphicBuffer = buffers[i]; - item.mSlot = *slot; - mCore->mConsumerListener->onBufferAllocated(item); - } - // Make sure the erase is done after all uses of the slot // iterator since it will be invalid after this point. mCore->mFreeSlots.erase(slot); |