VD: Fix Canvas save leak
bug:16965998 Change-Id: I367388b270748e2ce114b468940966d78de07465
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user