From a6bb2bc91914e1af8394f319911cce73b57355bf Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Wed, 8 Apr 2020 11:03:23 -0700 Subject: Buffer(Queue/State)Layer: Consolidate preparePerFrameCompositionState The only difference is the BLAST implementation fails when there is no cached buffer. While in general we expect cacheBuffers to be called by apply() there's no reason to add more code just to fail here. Noticed this while investigating a bug where cacheBuffers wasn't called. Bug: 153561718 Test: Existing tests pass Change-Id: If1faae68ef11de3f8b37474abeff14c42af3cd57 --- services/surfaceflinger/BufferQueueLayer.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'services/surfaceflinger/BufferQueueLayer.cpp') diff --git a/services/surfaceflinger/BufferQueueLayer.cpp b/services/surfaceflinger/BufferQueueLayer.cpp index c84b15d70d..f4e630e4d8 100644 --- a/services/surfaceflinger/BufferQueueLayer.cpp +++ b/services/surfaceflinger/BufferQueueLayer.cpp @@ -365,21 +365,6 @@ status_t BufferQueueLayer::updateFrameNumber(nsecs_t latchTime) { return NO_ERROR; } -void BufferQueueLayer::preparePerFrameCompositionState() { - BufferLayer::preparePerFrameCompositionState(); - - auto* compositionState = editCompositionState(); - if (compositionState->compositionType == Hwc2::IComposerClient::Composition::SIDEBAND) { - return; - } - - compositionState->buffer = mBufferInfo.mBuffer; - compositionState->bufferSlot = (mBufferInfo.mBufferSlot == BufferQueue::INVALID_BUFFER_SLOT) - ? 0 - : mBufferInfo.mBufferSlot; - compositionState->acquireFence = mBufferInfo.mFence; -} - // ----------------------------------------------------------------------- // Interface implementation for BufferLayerConsumer::ContentsChangedListener // ----------------------------------------------------------------------- -- cgit v1.2.3-59-g8ed1b