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

Commit 8f80837a 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-qpr-dev...

Merge "RenderEngine: don't blur when using protected content" into udc-qpr-dev am: 32422fb4 am: 19adf6ce

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



Change-Id: Ia20031e9bf696fff7bf80dd21c754b19cca17231
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9032c039 19adf6ce
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -714,7 +714,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
@@ -808,7 +810,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