summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2009-07-17 11:21:47 -0400
committerMike Reed <reed@google.com>2009-07-17 11:21:47 -0400
commit1b22b979256cf163ab9bbfd4fcfa16a8ce862ed1 (patch)
treed4e4aa2f8ebdfebb3d11fa6e46ad4224f96cab49 /graphics
parent8e3c3f6461b53dc587ba92b3fe8cfbeb985f8514 (diff)
downloadframeworks_base-1b22b979256cf163ab9bbfd4fcfa16a8ce862ed1.zip
frameworks_base-1b22b979256cf163ab9bbfd4fcfa16a8ce862ed1.tar.gz
frameworks_base-1b22b979256cf163ab9bbfd4fcfa16a8ce862ed1.tar.bz2
add hidden Options field for native allocations
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/BitmapFactory.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java
index e5a9aab..082e0c0 100644
--- a/graphics/java/android/graphics/BitmapFactory.java
+++ b/graphics/java/android/graphics/BitmapFactory.java
@@ -129,6 +129,19 @@ public class BitmapFactory {
public boolean inInputShareable;
/**
+ * Normally bitmap allocations count against the dalvik heap, which
+ * means they help trigger GCs when a lot have been allocated. However,
+ * in rare cases, the caller may want to allocate the bitmap outside of
+ * that heap. To request that, set inNativeAlloc to true. In these
+ * rare instances, it is solely up to the caller to ensure that OOM is
+ * managed explicitly by calling bitmap.recycle() as soon as such a
+ * bitmap is no longer needed.
+ *
+ * @hide pending API council approval
+ */
+ public boolean inNativeAlloc;
+
+ /**
* The resulting width of the bitmap, set independent of the state of
* inJustDecodeBounds. However, if there is an error trying to decode,
* outWidth will be set to -1.