add hidden Options field for native allocations

This commit is contained in:
Mike Reed
2009-07-17 11:21:47 -04:00
parent 8e3c3f6461
commit 1b22b97925
5 changed files with 60 additions and 31 deletions

View File

@@ -128,6 +128,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,