diff options
author | Romain Guy <romainguy@google.com> | 2011-01-17 13:03:16 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-17 13:03:16 -0800 |
commit | 1689c3459b27657b6900429ae64ac5323c584ce3 (patch) | |
tree | 00a4be73d862a7d4d44aade64b6def48222a0473 /graphics | |
parent | d6c54d97867edd566700c535f3edf57dd4396350 (diff) | |
parent | 2361098da3b9d9c3eeed410dc72ba62c0e9177cf (diff) | |
download | frameworks_base-1689c3459b27657b6900429ae64ac5323c584ce3.zip frameworks_base-1689c3459b27657b6900429ae64ac5323c584ce3.tar.gz frameworks_base-1689c3459b27657b6900429ae64ac5323c584ce3.tar.bz2 |
Merge "Add BitmapFactory.Options.inMutable to load mutable bitmaps." into honeycomb
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/Bitmap.java | 1 | ||||
-rw-r--r-- | graphics/java/android/graphics/BitmapFactory.java | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java index a8efd00..e67ceed 100644 --- a/graphics/java/android/graphics/Bitmap.java +++ b/graphics/java/android/graphics/Bitmap.java @@ -53,6 +53,7 @@ public final class Bitmap implements Parcelable { */ public byte[] mBuffer; + @SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"}) // Keep to finalize native resources private final BitmapFinalizer mFinalizer; private final boolean mIsMutable; diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java index 8309f7a..dd6bf19 100644 --- a/graphics/java/android/graphics/BitmapFactory.java +++ b/graphics/java/android/graphics/BitmapFactory.java @@ -64,6 +64,14 @@ public class BitmapFactory { public Bitmap inBitmap; /** + * If set, decode methods will always return a mutable Bitmap instead of + * an immutable one. This can be used for instance to programmatically apply + * effects to a Bitmap loaded through BitmapFactory. + */ + @SuppressWarnings({"UnusedDeclaration"}) // used in native code + public boolean inMutable; + + /** * If set to true, the decoder will return null (no bitmap), but * the out... fields will still be set, allowing the caller to query * the bitmap without having to allocate the memory for its pixels. @@ -523,7 +531,7 @@ public class BitmapFactory { } bm.setDensity(targetDensity); } - + return bm; } |