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

Commit 34c50287 authored by Leon Scroggins's avatar Leon Scroggins Committed by Automerger Merge Worker
Browse files

Merge "RenderEngine: don't blur when using protected content" into udc-dev am:...

Merge "RenderEngine: don't blur when using protected content" into udc-dev am: 40fb4429 am: 8729f824

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



Change-Id: If77bf2bcff44636464d193f61a80dc831844b88b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d8ae3dd6 8729f824
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -711,7 +711,9 @@ void SkiaRenderEngine::drawLayersInternal(
    SkCanvas* canvas = dstCanvas;
    SkiaCapture::OffscreenState offscreenCaptureState;
    const LayerSettings* blurCompositionLayer = nullptr;
    if (mBlurFilter) {

    // TODO (b/270314344): Enable blurs in protected context.
    if (mBlurFilter && !mInProtectedContext) {
        bool requiresCompositionLayer = false;
        for (const auto& layer : layers) {
            // if the layer doesn't have blur or it is not visible then continue
@@ -805,7 +807,8 @@ void SkiaRenderEngine::drawLayersInternal(
        const auto [bounds, roundRectClip] =
                getBoundsAndClip(layer.geometry.boundaries, layer.geometry.roundedCornersCrop,
                                 layer.geometry.roundedCornersRadius);
        if (mBlurFilter && layerHasBlur(layer, ctModifiesAlpha)) {
        // TODO (b/270314344): Enable blurs in protected context.
        if (mBlurFilter && layerHasBlur(layer, ctModifiesAlpha) && !mInProtectedContext) {
            std::unordered_map<uint32_t, sk_sp<SkImage>> cachedBlurs;

            // if multiple layers have blur, then we need to take a snapshot now because