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

Commit 247b2418 authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Leon Scroggins
Browse files

RenderEngine: don't blur when using protected content

Work around a bug by skipping blur when using protected content.

Bug: 244398863
Bug: 270314344
Bug: 205516620
Bug: 242266174
Bug: 213116783
Test: manual (ExoPlayer)
Change-Id: Ifcacbd4c44aee1a504a7c46f3fece51004ed7f37
(cherry picked from commit 4623eeb2)
Merged-In: Ifcacbd4c44aee1a504a7c46f3fece51004ed7f37
parent ce68dd7e
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