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

Commit 5e16196c authored by Huihong Luo's avatar Huihong Luo
Browse files

Fix a crash for skipped layers with null buffers

No need to process these layers.

Bug: 240653315
Bug: 230073351
Test: YouTube PIP at home screen
Change-Id: Iced392706e33a2241197050ddd24e0fffaa3a723
parent 347589f6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -664,6 +664,9 @@ void OutputLayer::uncacheBuffers(const std::vector<uint64_t>& bufferIdsToUncache
void OutputLayer::writeBufferStateToHWC(HWC2::Layer* hwcLayer,
                                        const LayerFECompositionState& outputIndependentState,
                                        bool skipLayer) {
    if (skipLayer && outputIndependentState.buffer == nullptr) {
        return;
    }
    auto supportedPerFrameMetadata =
            getOutput().getDisplayColorProfile()->getSupportedPerFrameMetadata();
    if (auto error = hwcLayer->setPerFrameMetadata(supportedPerFrameMetadata,