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

Commit 06ed84f7 authored by Diego Perez's avatar Diego Perez Committed by Android (Google) Code Review
Browse files

Merge "Handle case where canvas is 0x0 for shadows"

parents 8df7558e ef74ede0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -127,6 +127,9 @@ public class RectShadowPainter {

    private static void paintGeometricShadow(@NonNull float[][] coordinates, float lightPosX,
            float lightPosY, float lightHeight, float lightSize, Canvas canvas) {
        if (canvas == null || canvas.getWidth() == 0 || canvas.getHeight() == 0) {
            return;
        }

        // The polygon of shadow (same as the original item)
        float[] shadowPoly = new float[coordinates.length * 3];