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

Commit 759f780a authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Enable scissor for rounded outline clips" into lmp-dev

parents bfecd904 79d26c72
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -196,13 +196,15 @@ void StatefulBaseRenderer::setClippingOutline(LinearAllocator& allocator, const
    float radius;
    if (!outline->getAsRoundRect(&bounds, &radius)) return; // only RR supported

    if (!MathUtils::isPositive(radius)) {
    bool outlineIsRounded = MathUtils::isPositive(radius);
    if (!outlineIsRounded || currentTransform()->isSimple()) {
        // TODO: consider storing this rect separately, so that this can't be replaced with clip ops
        clipRect(bounds.left, bounds.top, bounds.right, bounds.bottom, SkRegion::kIntersect_Op);
        return;
    }
    if (outlineIsRounded) {
        setClippingRoundRect(allocator, bounds, radius);
    }
}

void StatefulBaseRenderer::setClippingRoundRect(LinearAllocator& allocator,
        const Rect& rect, float radius) {