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

Commit c7195550 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix PunchHole when punching a Rectangle shape" into main

parents 4a61571b 464c4466
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -72,15 +72,16 @@ internal class PunchHole(
    }

    private fun DrawScope.drawHole(bounds: Element) {
        val boundsSize = bounds.lastSize.toSize()
        if (shape == RectangleShape) {
            drawRect(Color.Black, blendMode = BlendMode.DstOut)
            drawRect(Color.Black, size = boundsSize, blendMode = BlendMode.DstOut)
            return
        }

        // TODO(b/290184746): Cache outline if the size of bounds does not change.
        drawOutline(
            shape.createOutline(
                bounds.lastSize.toSize(),
                boundsSize,
                layoutDirection,
                this,
            ),