summaryrefslogtreecommitdiffstats
path: root/graphics/java/android
diff options
context:
space:
mode:
authorAdam Koch <akoch@google.com>2013-11-05 17:46:24 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-11-05 17:46:24 -0800
commit918997738383a847e3e019c24ec1b4f4ad39c43e (patch)
tree66db249b9277eed85e542a6314eb5da5f7746b60 /graphics/java/android
parentb92fd5d893548cfae71f5efda6d4f1e46004e5da (diff)
parent66e47c5feca7425b0f2afbe3b4abb513b4f05279 (diff)
downloadframeworks_base-918997738383a847e3e019c24ec1b4f4ad39c43e.zip
frameworks_base-918997738383a847e3e019c24ec1b4f4ad39c43e.tar.gz
frameworks_base-918997738383a847e3e019c24ec1b4f4ad39c43e.tar.bz2
am 66e47c5f: am 0c5268c3: am be0b05a0: Merge "Doc fix: add more detail to BitmapFactory.Options.inPurgeable flag. Bug: 6064760" into klp-dev
* commit '66e47c5feca7425b0f2afbe3b4abb513b4f05279': Doc fix: add more detail to BitmapFactory.Options.inPurgeable flag. Bug: 6064760
Diffstat (limited to 'graphics/java/android')
-rw-r--r--graphics/java/android/graphics/BitmapFactory.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java
index b73db74..b714fab 100644
--- a/graphics/java/android/graphics/BitmapFactory.java
+++ b/graphics/java/android/graphics/BitmapFactory.java
@@ -259,14 +259,26 @@ public class BitmapFactory {
* (e.g. the bitmap is drawn, getPixels() is called), they will be
* automatically re-decoded.
*
- * For the re-decode to happen, the bitmap must have access to the
+ * <p>For the re-decode to happen, the bitmap must have access to the
* encoded data, either by sharing a reference to the input
* or by making a copy of it. This distinction is controlled by
* inInputShareable. If this is true, then the bitmap may keep a shallow
* reference to the input. If this is false, then the bitmap will
* explicitly make a copy of the input data, and keep that. Even if
* sharing is allowed, the implementation may still decide to make a
- * deep copy of the input data.
+ * deep copy of the input data.</p>
+ *
+ * <p>While inPurgeable can help avoid big Dalvik heap allocations (from
+ * API level 11 onward), it sacrifices performance predictability since any
+ * image that the view system tries to draw may incur a decode delay which
+ * can lead to dropped frames. Therefore, most apps should avoid using
+ * inPurgeable to allow for a fast and fluid UI. To minimize Dalvik heap
+ * allocations use the {@link #inBitmap} flag instead.</p>
+ *
+ * <p class="note"><strong>Note:</strong> This flag is ignored when used
+ * with {@link #decodeResource(Resources, int,
+ * android.graphics.BitmapFactory.Options)} or {@link #decodeFile(String,
+ * android.graphics.BitmapFactory.Options)}.</p>
*/
public boolean inPurgeable;