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

Commit f04c2458 authored by Ady Abraham's avatar Ady Abraham Committed by Automerger Merge Worker
Browse files

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14020906

Change-Id: I285507e6266a53f316787f93a0322e333dc1f3bc
parents 06a424ce 0e2b9747
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;
    }