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

Commit 0670f029 authored by ztenghui's avatar ztenghui
Browse files

VD: Fix Canvas save leak

bug:16965998

Change-Id: I367388b270748e2ce114b468940966d78de07465
parent 1fbc1247
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -238,14 +238,13 @@ public class VectorDrawable extends Drawable {

    @Override
    public void draw(Canvas canvas) {
        final int saveCount = canvas.save();
        final Rect bounds = getBounds();

        if (bounds.width() == 0 || bounds.height() == 0) {
            // too small to draw
            return;
        }

        final int saveCount = canvas.save();
        final boolean needMirroring = needMirroring();

        canvas.translate(bounds.left, bounds.top);