diff options
author | 2019-04-30 18:24:05 -0700 | |
---|---|---|
committer | 2019-05-06 17:55:25 -0700 | |
commit | 485e4c358b26f09ec0634e63c311131c9507779a (patch) | |
tree | 08a623a6f2942a359a5a785290b7f7c4a7e00e70 /services/surfaceflinger/BufferQueueLayer.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 'services/surfaceflinger/BufferQueueLayer.cpp')
-rw-r--r-- | services/surfaceflinger/BufferQueueLayer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/surfaceflinger/BufferQueueLayer.cpp b/services/surfaceflinger/BufferQueueLayer.cpp index 5d729f5b4f..3d51ec33b2 100644 --- a/services/surfaceflinger/BufferQueueLayer.cpp +++ b/services/surfaceflinger/BufferQueueLayer.cpp @@ -14,6 +14,9 @@ * limitations under the License. */ +#undef LOG_TAG +#define LOG_TAG "BufferQueueLayer" +#define ATRACE_TAG ATRACE_TAG_GRAPHICS #include <compositionengine/Display.h> #include <compositionengine/Layer.h> #include <compositionengine/OutputLayer.h> @@ -435,6 +438,7 @@ void BufferQueueLayer::fakeVsync() { } void BufferQueueLayer::onFrameAvailable(const BufferItem& item) { + ATRACE_CALL(); // Add this buffer from our internal queue tracker { // Autolock scope if (mFlinger->mUseSmart90ForVideo) { @@ -475,9 +479,11 @@ void BufferQueueLayer::onFrameAvailable(const BufferItem& item) { } else { mFlinger->signalLayerUpdate(); } + mConsumer->onBufferAvailable(item); } void BufferQueueLayer::onFrameReplaced(const BufferItem& item) { + ATRACE_CALL(); { // Autolock scope Mutex::Autolock lock(mQueueItemLock); @@ -499,6 +505,7 @@ void BufferQueueLayer::onFrameReplaced(const BufferItem& item) { mLastFrameNumberReceived = item.mFrameNumber; mQueueItemCondition.broadcast(); } + mConsumer->onBufferAvailable(item); } void BufferQueueLayer::onSidebandStreamChanged() { |