Package com.bumptech.glide.gifdecoder
Interface GifDecoder.BitmapProvider
-
- Enclosing interface:
- GifDecoder
public static interface GifDecoder.BitmapProviderAn interface that can be used to provide reusedBitmaps to avoid GCs from constantly allocatingBitmaps for every frame.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description android.graphics.Bitmapobtain(int width, int height, android.graphics.Bitmap.Config config)Returns anBitmapwith 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.voidrelease(byte[] bytes)Releases the given byte array back to the pool.voidrelease(int[] array)Release the given array back to the pool.voidrelease(android.graphics.Bitmap bitmap)Releases the given Bitmap back to the pool.
-
-
-
Method Detail
-
obtain
@NonNull android.graphics.Bitmap obtain(int width, int height, @NonNull android.graphics.Bitmap.Config config)Returns anBitmapwith exactly the given dimensions and config.- Parameters:
width- The width in pixels of the desiredBitmap.height- The height in pixels of the desiredBitmap.config- TheBitmap.Configof the desiredBitmap.
-
release
void release(@NonNull android.graphics.Bitmap bitmap)Releases the given Bitmap back to the pool.
-
obtainByteArray
@NonNull byte[] obtainByteArray(int size)
Returns a byte array used for decoding and generating the frame bitmap.- Parameters:
size- the size of the byte array to obtain
-
release
void release(@NonNull byte[] bytes)Releases the given byte array back to the pool.
-
obtainIntArray
@NonNull int[] obtainIntArray(int size)
Returns an int array used for decoding/generating the frame bitmaps.
-
release
void release(@NonNull int[] array)Release the given array back to the pool.
-
-