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

Commit 8975018f authored by Charlie Tsai's avatar Charlie Tsai
Browse files

avoid calculate shadow when elevation is 0

Test: N/A
Bug: 37906145
Change-Id: Ib8dc3f781767271388eb3e6f886267e9d98d67f8
parent 47e090c3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -41,6 +41,11 @@ public class RectShadowPainter {
            return;
        }

        if (elevation <= 0) {
            // If elevation is 0, we don't need to paint the shadow
            return;
        }

        Rect originCanvasRect = canvas.getClipBounds();
        int saved = modifyCanvas(canvas);
        if (saved == -1) {