public static interface GifDecoder.BitmapProvider
Bitmaps to avoid GCs
from constantly allocating Bitmaps for every frame.| Modifier and Type | Method and Description |
|---|---|
android.graphics.Bitmap |
obtain(int width,
int height,
android.graphics.Bitmap.Config config)
Returns an
Bitmap with exactly the given dimensions and config. |
byte[] |
obtainByteArray(int size)
Returns a byte array used for decoding and generating the frame bitmap.
|
int[] |
obtainIntArray(int size)
Returns an int array used for decoding/generating the frame bitmaps.
|
void |
release(android.graphics.Bitmap bitmap)
Releases the given Bitmap back to the pool.
|
void |
release(byte[] bytes)
Releases the given byte array back to the pool.
|
void |
release(int[] array)
Release the given array back to the pool.
|
@NonNull
android.graphics.Bitmap obtain(int width,
int height,
@NonNull
android.graphics.Bitmap.Config config)
Bitmap with exactly the given dimensions and config.width - The width in pixels of the desired Bitmap.height - The height in pixels of the desired Bitmap.config - The Bitmap.Config of the desired Bitmap.void release(@NonNull
android.graphics.Bitmap bitmap)
@NonNull byte[] obtainByteArray(int size)
size - the size of the byte array to obtainvoid release(@NonNull
byte[] bytes)
@NonNull int[] obtainIntArray(int size)
void release(@NonNull
int[] array)