mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-27 06:10:28 +01:00
DroidFish: Small optimization.
This commit is contained in:
parent
62008f45c7
commit
41014a5cd8
|
@ -6,7 +6,6 @@ import android.graphics.Bitmap;
|
|||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.PictureDrawable;
|
||||
|
||||
/**
|
||||
|
@ -52,7 +51,7 @@ public class SVGPictureDrawable extends PictureDrawable {
|
|||
if (!b.equals(cachedBounds)) {
|
||||
Bitmap bm = Bitmap.createBitmap(b.right-b.left, b.bottom-b.top, Bitmap.Config.ARGB_8888);
|
||||
Canvas bmCanvas = new Canvas(bm);
|
||||
bmCanvas.drawPicture(getPicture(), getBounds());
|
||||
bmCanvas.drawPicture(getPicture(), b);
|
||||
cachedBitmap = bm;
|
||||
cachedBounds = b;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user