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

Commit 362e4df1 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Address remaining comment of ag/25829379

Bug: 305195729
Test: PunchHoleTest
Flag: N/A
Change-Id: I6906826a87b2c850e9cd9cce6a0d1da322492b77
parent 3ff81f85
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -107,17 +107,14 @@ private class PunchHoleNode(
    }

    override fun ContentDrawScope.draw() {
        val holeSize = size()
        if (holeSize == Size.Zero) {
            drawContent()
            return
        }

        drawContent()

        val holeSize = size()
        if (holeSize != Size.Zero) {
            val offset = offset()
            translate(offset.x, offset.y) { drawHole(holeSize) }
        }
    }

    private fun DrawScope.drawHole(size: Size) {
        if (shape == RectangleShape) {