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/BufferStateLayer.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'services/surfaceflinger/BufferStateLayer.cpp') diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp index 3e651713e4..a121ce0672 100644 --- a/services/surfaceflinger/BufferStateLayer.cpp +++ b/services/surfaceflinger/BufferStateLayer.cpp @@ -631,19 +631,6 @@ status_t BufferStateLayer::updateFrameNumber(nsecs_t latchTime) { return NO_ERROR; } -void BufferStateLayer::preparePerFrameCompositionState() { - BufferLayer::preparePerFrameCompositionState(); - - auto* compositionState = editCompositionState(); - if (compositionState->compositionType == Hwc2::IComposerClient::Composition::SIDEBAND) { - return; - } - - compositionState->buffer = mBufferInfo.mBuffer; - compositionState->bufferSlot = mBufferInfo.mBufferSlot; - compositionState->acquireFence = mBufferInfo.mFence; -} - void BufferStateLayer::HwcSlotGenerator::bufferErased(const client_cache_t& clientCacheId) { std::lock_guard lock(mMutex); if (!clientCacheId.isValid()) { -- cgit v1.2.3-59-g8ed1b