diff options
author | Romain Guy <romainguy@google.com> | 2011-01-17 12:51:55 -0800 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-01-17 13:04:12 -0800 |
commit | 2361098da3b9d9c3eeed410dc72ba62c0e9177cf (patch) | |
tree | f3c5cb63e38bfb99ef76e10400cb846ecc21c812 /tests/HwAccelerationTest | |
parent | 875862e3ec85153553ce50acc02863ea0720ccb6 (diff) | |
download | frameworks_base-2361098da3b9d9c3eeed410dc72ba62c0e9177cf.zip frameworks_base-2361098da3b9d9c3eeed410dc72ba62c0e9177cf.tar.gz frameworks_base-2361098da3b9d9c3eeed410dc72ba62c0e9177cf.tar.bz2 |
Add BitmapFactory.Options.inMutable to load mutable bitmaps.
Change-Id: Iaa222127520f3aa55072d44af12ee3477908b876
Diffstat (limited to 'tests/HwAccelerationTest')
-rw-r--r-- | tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsActivity.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsActivity.java index 4054353..607a173 100644 --- a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsActivity.java +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsActivity.java @@ -25,6 +25,7 @@ import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.os.Bundle; +import android.util.Log; import android.view.Gravity; import android.view.View; import android.view.animation.Animation; @@ -61,7 +62,15 @@ public class BitmapsActivity extends Activity { mBitmap1 = BitmapFactory.decodeResource(c.getResources(), R.drawable.sunset1); mBitmap2 = BitmapFactory.decodeResource(c.getResources(), R.drawable.sunset2); + + Log.d("Bitmap", "mBitmap1.isMutable() = " + mBitmap1.isMutable()); + Log.d("Bitmap", "mBitmap2.isMutable() = " + mBitmap2.isMutable()); + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inMutable = true; + Bitmap bitmap = BitmapFactory.decodeResource(c.getResources(), R.drawable.sunset1, opts); + Log.d("Bitmap", "bitmap.isMutable() = " + bitmap.isMutable()); + mBitmapPaint = new Paint(); mDstIn = new PorterDuffXfermode(PorterDuff.Mode.DST_IN); } |