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

Commit 0e2b9747 authored by Ady Abraham's avatar Ady Abraham Committed by Android (Google) Code Review
Browse files

Merge "SF: black out layers that doesn't have gpu accessible buffer" into sc-dev

parents e6b5063a 7a60afbe
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -185,10 +185,14 @@ std::optional<compositionengine::LayerFE::LayerSettings> BufferLayer::prepareCli
            return std::nullopt;
        }
    }
    bool blackOutLayer = (isProtected() && !targetSettings.supportsProtectedContent) ||
    const bool blackOutLayer = (isProtected() && !targetSettings.supportsProtectedContent) ||
            (isSecure() && !targetSettings.isSecure);
    const bool bufferCanBeUsedAsHwTexture =
            mBufferInfo.mBuffer->getUsage() & GraphicBuffer::USAGE_HW_TEXTURE;
    compositionengine::LayerFE::LayerSettings& layer = *result;
    if (blackOutLayer) {
    if (blackOutLayer || !bufferCanBeUsedAsHwTexture) {
        ALOGE_IF(!bufferCanBeUsedAsHwTexture, "%s is blacked out as buffer is not gpu readable",
                 mName.c_str());
        prepareClearClientComposition(layer, true /* blackout */);
        return layer;
    }