public class MountItemsPool
extends java.lang.Object
FUTURE: Consider customizing the pool implementation such that we can match buffer sizes. Without this we will tend to expand all buffers to the largest size needed.
Modifier and Type | Class and Description |
---|---|
static interface |
MountItemsPool.ItemPool
Content item pools that RenderCore uses to recycle content (such as Views)
|
Modifier and Type | Field and Description |
---|---|
static boolean |
isPoolingDisabled
Should be used to disable pooling entirely for debugging, testing, and other use cases.
|
static boolean |
sIsManualCallbacks
To support Gingerbread (where the registerActivityLifecycleCallbacks API doesn't exist), we
allow apps to explicitly invoke activity callbacks.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
acquireHostMountContent(Context context,
IBinder windowToken,
ContentAllocator hostContentProvider) |
static java.lang.Object |
acquireMountContent(Context context,
ContentAllocator poolableMountContent) |
static void |
clear() |
static java.util.List<MountItemsPool.ItemPool> |
getMountItemPools() |
static void |
maybePreallocateContent(Context context,
ContentAllocator poolableMountContent) |
static void |
onContextCreated(Context context) |
static void |
onContextDestroyed(Context context) |
static void |
prefillMountContentPool(Context context,
int poolSize,
ContentAllocator poolableMountContent)
Can be called to fill up a mount content pool for the specified MountContent types.
|
static void |
release(Context context,
ContentAllocator poolableMountContent,
java.lang.Object mountContent) |
static void |
releaseHostMountContent(Context context,
IBinder windowToken,
ContentAllocator hostContentProvider,
java.lang.Object content) |
public static boolean sIsManualCallbacks
public static boolean isPoolingDisabled
public static java.lang.Object acquireMountContent(Context context, ContentAllocator poolableMountContent)
public static void release(Context context, ContentAllocator poolableMountContent, java.lang.Object mountContent)
public static void maybePreallocateContent(Context context, ContentAllocator poolableMountContent)
public static void prefillMountContentPool(Context context, int poolSize, ContentAllocator poolableMountContent)
public static void clear()
public static java.lang.Object acquireHostMountContent(Context context, IBinder windowToken, ContentAllocator hostContentProvider)
public static void releaseHostMountContent(Context context, IBinder windowToken, ContentAllocator hostContentProvider, java.lang.Object content)
public static void onContextCreated(Context context)
public static void onContextDestroyed(Context context)
public static java.util.List<MountItemsPool.ItemPool> getMountItemPools()