Loading services/surfaceflinger/BufferLayer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ void BufferLayer::preparePerFrameCompositionState() { // Sideband layers auto* compositionState = editCompositionState(); if (compositionState->sidebandStream.get()) { if (compositionState->sidebandStream.get() && !compositionState->sidebandStreamHasFrame) { compositionState->compositionType = Hwc2::IComposerClient::Composition::SIDEBAND; return; } else { Loading @@ -303,6 +303,7 @@ void BufferLayer::preparePerFrameCompositionState() { ? 0 : mBufferInfo.mBufferSlot; compositionState->acquireFence = mBufferInfo.mFence; compositionState->sidebandStreamHasFrame = false; } bool BufferLayer::onPreComposition(nsecs_t refreshStartTime) { Loading services/surfaceflinger/BufferQueueLayer.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -197,11 +197,10 @@ uint64_t BufferQueueLayer::getFrameNumber(nsecs_t expectedPresentTime) const { bool BufferQueueLayer::latchSidebandStream(bool& recomputeVisibleRegions) { // We need to update the sideband stream if the layer has both a buffer and a sideband stream. const bool updateSidebandStream = hasFrameUpdate() && mSidebandStream.get(); editCompositionState()->sidebandStreamHasFrame = hasFrameUpdate() && mSidebandStream.get(); bool sidebandStreamChanged = true; if (mSidebandStreamChanged.compare_exchange_strong(sidebandStreamChanged, false) || updateSidebandStream) { if (mSidebandStreamChanged.compare_exchange_strong(sidebandStreamChanged, false)) { // mSidebandStreamChanged was changed to false mSidebandStream = mConsumer->getSidebandStream(); auto* layerCompositionState = editCompositionState(); Loading services/surfaceflinger/BufferStateLayer.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -697,9 +697,9 @@ void BufferStateLayer::setAutoRefresh(bool autoRefresh) { bool BufferStateLayer::latchSidebandStream(bool& recomputeVisibleRegions) { // We need to update the sideband stream if the layer has both a buffer and a sideband stream. const bool updateSidebandStream = hasFrameUpdate() && mSidebandStream.get(); editCompositionState()->sidebandStreamHasFrame = hasFrameUpdate() && mSidebandStream.get(); if (mSidebandStreamChanged.exchange(false) || updateSidebandStream) { if (mSidebandStreamChanged.exchange(false)) { const State& s(getDrawingState()); // mSidebandStreamChanged was true mSidebandStream = s.sidebandStream; Loading services/surfaceflinger/CompositionEngine/include/compositionengine/LayerFECompositionState.h +2 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,8 @@ struct LayerFECompositionState { // The handle to use for a sideband stream for this layer sp<NativeHandle> sidebandStream; // If true, this sideband layer has a frame update bool sidebandStreamHasFrame{false}; // The color for this layer half4 color; Loading Loading
services/surfaceflinger/BufferLayer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ void BufferLayer::preparePerFrameCompositionState() { // Sideband layers auto* compositionState = editCompositionState(); if (compositionState->sidebandStream.get()) { if (compositionState->sidebandStream.get() && !compositionState->sidebandStreamHasFrame) { compositionState->compositionType = Hwc2::IComposerClient::Composition::SIDEBAND; return; } else { Loading @@ -303,6 +303,7 @@ void BufferLayer::preparePerFrameCompositionState() { ? 0 : mBufferInfo.mBufferSlot; compositionState->acquireFence = mBufferInfo.mFence; compositionState->sidebandStreamHasFrame = false; } bool BufferLayer::onPreComposition(nsecs_t refreshStartTime) { Loading
services/surfaceflinger/BufferQueueLayer.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -197,11 +197,10 @@ uint64_t BufferQueueLayer::getFrameNumber(nsecs_t expectedPresentTime) const { bool BufferQueueLayer::latchSidebandStream(bool& recomputeVisibleRegions) { // We need to update the sideband stream if the layer has both a buffer and a sideband stream. const bool updateSidebandStream = hasFrameUpdate() && mSidebandStream.get(); editCompositionState()->sidebandStreamHasFrame = hasFrameUpdate() && mSidebandStream.get(); bool sidebandStreamChanged = true; if (mSidebandStreamChanged.compare_exchange_strong(sidebandStreamChanged, false) || updateSidebandStream) { if (mSidebandStreamChanged.compare_exchange_strong(sidebandStreamChanged, false)) { // mSidebandStreamChanged was changed to false mSidebandStream = mConsumer->getSidebandStream(); auto* layerCompositionState = editCompositionState(); Loading
services/surfaceflinger/BufferStateLayer.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -697,9 +697,9 @@ void BufferStateLayer::setAutoRefresh(bool autoRefresh) { bool BufferStateLayer::latchSidebandStream(bool& recomputeVisibleRegions) { // We need to update the sideband stream if the layer has both a buffer and a sideband stream. const bool updateSidebandStream = hasFrameUpdate() && mSidebandStream.get(); editCompositionState()->sidebandStreamHasFrame = hasFrameUpdate() && mSidebandStream.get(); if (mSidebandStreamChanged.exchange(false) || updateSidebandStream) { if (mSidebandStreamChanged.exchange(false)) { const State& s(getDrawingState()); // mSidebandStreamChanged was true mSidebandStream = s.sidebandStream; Loading
services/surfaceflinger/CompositionEngine/include/compositionengine/LayerFECompositionState.h +2 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,8 @@ struct LayerFECompositionState { // The handle to use for a sideband stream for this layer sp<NativeHandle> sidebandStream; // If true, this sideband layer has a frame update bool sidebandStreamHasFrame{false}; // The color for this layer half4 color; Loading