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

Commit e0acf382 authored by Galia Peycheva's avatar Galia Peycheva
Browse files

Make blur regions alpha depend on layer alpha

Bug: 183109337
Test: m && flash && check blur region alpha animating
Change-Id: I17032051909c12aab60225a080b7431e0b35814a
parent 73939a9a
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -2264,8 +2264,13 @@ int32_t Layer::getBackgroundBlurRadius() const {
    return parentAlpha * getDrawingState().backgroundBlurRadius;
}

const std::vector<BlurRegion>& Layer::getBlurRegions() const {
    return getDrawingState().blurRegions;
const std::vector<BlurRegion> Layer::getBlurRegions() const {
    auto regionsCopy(getDrawingState().blurRegions);
    int layerAlpha = getAlpha();
    for (auto& region : regionsCopy) {
        region.alpha = region.alpha * layerAlpha;
    }
    return regionsCopy;
}

Layer::RoundedCornerState Layer::getRoundedCornerState() const {
+1 −1
Original line number Diff line number Diff line
@@ -1192,7 +1192,7 @@ private:
    float mEffectiveShadowRadius = 0.f;

    // A list of regions on this layer that should have blurs.
    const std::vector<BlurRegion>& getBlurRegions() const;
    const std::vector<BlurRegion> getBlurRegions() const;
};

std::ostream& operator<<(std::ostream& stream, const Layer::FrameRate& rate);