diff options
author | 2019-03-21 11:44:18 -0700 | |
---|---|---|
committer | 2019-03-28 11:43:03 -0700 | |
commit | d7b3a8bcf9946a32213812a46f9c88a910151686 (patch) | |
tree | 72870b23665ad96b703f4e1d32b7c0dabce54e89 /libs/gui/BufferQueue.cpp | |
parent | dc705b9eafeb07326155a580e722c7dca8d61892 (diff) |
Create EGLImages during buffer allocation
EGLImage creation is now performed on an async binder thread, so now GPU
composition should rarely be stalled by expensive image creation.
Bug: 129008989
Test: systrace
Change-Id: I9732f866933a8950a4c69ff51d5ac1622bbb3470
Diffstat (limited to 'libs/gui/BufferQueue.cpp')
-rw-r--r-- | libs/gui/BufferQueue.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp index 5fb3f0b80f..d87228fbbd 100644 --- a/libs/gui/BufferQueue.cpp +++ b/libs/gui/BufferQueue.cpp @@ -59,6 +59,13 @@ void BufferQueue::ProxyConsumerListener::onFrameReplaced( } } +void BufferQueue::ProxyConsumerListener::onBufferAllocated(const BufferItem& item) { + sp<ConsumerListener> listener(mConsumerListener.promote()); + if (listener != nullptr) { + listener->onBufferAllocated(item); + } +} + void BufferQueue::ProxyConsumerListener::onBuffersReleased() { sp<ConsumerListener> listener(mConsumerListener.promote()); if (listener != nullptr) { |