diff options
Diffstat (limited to 'src/com/android/launcher3/FastBitmapDrawable.java')
-rw-r--r-- | src/com/android/launcher3/FastBitmapDrawable.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher3/FastBitmapDrawable.java b/src/com/android/launcher3/FastBitmapDrawable.java index ea623f765..847a8e1bc 100644 --- a/src/com/android/launcher3/FastBitmapDrawable.java +++ b/src/com/android/launcher3/FastBitmapDrawable.java @@ -27,12 +27,18 @@ import android.graphics.drawable.Drawable; class FastBitmapDrawable extends Drawable { private Bitmap mBitmap; private int mAlpha; + private int mWidth; + private int mHeight; private final Paint mPaint = new Paint(Paint.FILTER_BITMAP_FLAG); FastBitmapDrawable(Bitmap b) { mAlpha = 255; mBitmap = b; + if (b != null) { setBounds(0, 0, b.getWidth(), b.getHeight()); + } else { + mWidth = mHeight = 0; + } } @Override |