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

Commit be61380a authored by Peiyong Lin's avatar Peiyong Lin Committed by Android (Google) Code Review
Browse files

Merge "Revert "[RoundedCorner] Use the correct source bounds and crop.""

parents 0c632fa9 27016a9f
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -1788,13 +1788,9 @@ half4 Layer::getColor() const {
}

Layer::RoundedCornerState Layer::getRoundedCornerState() const {
    return getRoundedCornerStateInternal(mSourceBounds);
}

Layer::RoundedCornerState Layer::getRoundedCornerStateInternal(const FloatRect bounds) const {
    const auto& p = mDrawingParent.promote();
    if (p != nullptr) {
        RoundedCornerState parentState = p->getRoundedCornerStateInternal(bounds);
        RoundedCornerState parentState = p->getRoundedCornerState();
        if (parentState.radius > 0) {
            ui::Transform t = getActiveTransform(getDrawingState());
            t = t.inverse();
@@ -1808,9 +1804,7 @@ Layer::RoundedCornerState Layer::getRoundedCornerStateInternal(const FloatRect b
        }
    }
    const float radius = getDrawingState().cornerRadius;
    return radius > 0
            ? RoundedCornerState(bounds.intersect(getCrop(getDrawingState()).toFloatRect()), radius)
            : RoundedCornerState();
    return radius > 0 ? RoundedCornerState(getBounds(), radius) : RoundedCornerState();
}

void Layer::commitChildList() {
+0 −2
Original line number Diff line number Diff line
@@ -908,8 +908,6 @@ private:
     */
    Rect getCroppedBufferSize(const Layer::State& s) const;

    RoundedCornerState getRoundedCornerStateInternal(const FloatRect bounds) const;

    // Cached properties computed from drawing state
    // Effective transform taking into account parent transforms and any parent scaling.
    ui::Transform mEffectiveTransform;