Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 082e96d9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update sideband stream when layer has queued a buffer"

parents defb6a19 7cc3dd32
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -208,8 +208,14 @@ bool BufferQueueLayer::getSidebandStreamChanged() const {
}

bool BufferQueueLayer::latchSidebandStream(bool& recomputeVisibleRegions) {
    const bool updateSidebandStream = hasFrameUpdate() && mSidebandStream.get();
    ALOGV_IF(updateSidebandStream,
             "[%s] has both sideband stream and buffer. Updating the sideband stream.",
             mName.c_str());

    bool sidebandStreamChanged = true;
    if (mSidebandStreamChanged.compare_exchange_strong(sidebandStreamChanged, false)) {
    if (mSidebandStreamChanged.compare_exchange_strong(sidebandStreamChanged, false) ||
        updateSidebandStream) {
        // mSidebandStreamChanged was changed to false
        mSidebandStream = mConsumer->getSidebandStream();
        auto* layerCompositionState = editCompositionState();