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

Commit 0559ca76 authored by Ana Krulec's avatar Ana Krulec
Browse files

Respect LayerSettings::alpha in Skia-RE for buffer layers

Test: Manual. Open notification. Check whether the alpha of
      the shade is correct.
Bug: 173418499
Change-Id: I768fe3046bbcce3ab3156a0ced9fc14f34f4f1bc
parent 6c24c1b2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -678,6 +678,8 @@ status_t SkiaGLRenderEngine::drawLayers(const DisplaySettings& display,
            } else {
                paint.setShader(shader);
            }
            // Make sure to take into the account the alpha set on the layer.
            paint.setAlphaf(layer->alpha);
        } else {
            ATRACE_NAME("DrawColor");
            const auto color = layer->source.solidColor;
@@ -824,7 +826,7 @@ void SkiaGLRenderEngine::drawBlurRegion(SkCanvas* canvas, const BlurRegion& effe
    ATRACE_CALL();

    SkPaint paint;
    paint.setAlpha(static_cast<int>(effectRegion.alpha * 255));
    paint.setAlphaf(effectRegion.alpha);
    const auto matrix = mBlurFilter->getShaderMatrix();
    paint.setShader(blurredSurface->makeImageSnapshot()->makeShader(matrix));