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

Commit d84eb5e0 authored by Galia Peycheva's avatar Galia Peycheva Committed by Android (Google) Code Review
Browse files

Merge "Make blur regions alpha depend on layer alpha" into sc-dev

parents 80402b93 e0acf382
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
@@ -1191,7 +1191,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);