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

Commit 3c64b9ef authored by Galia Peycheva's avatar Galia Peycheva Committed by Automerger Merge Worker
Browse files

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

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

Change-Id: Ifa1030a441587ace342a03d701f69c05c5873354
parents 8acfa3bc d84eb5e0
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);