com.bumptech.glide.gifdecoder
Interface GifDecoder.BitmapProvider

Enclosing class:
GifDecoder

public static interface GifDecoder.BitmapProvider

An interface that can be used to provide reused Bitmaps to avoid GCs from constantly allocating Bitmaps for every frame.


Method Summary
 Bitmap obtain(int width, int height, Bitmap.Config config)
          Returns an Bitmap with exactly the given dimensions and config, or null if no such Bitmap could be obtained.
 void release(Bitmap bitmap)
          Releases the given Bitmap back to the pool.
 

Method Detail

obtain

Bitmap obtain(int width,
              int height,
              Bitmap.Config config)
Returns an Bitmap with exactly the given dimensions and config, or null if no such Bitmap could be obtained.

Parameters:
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.

release

void release(Bitmap bitmap)
Releases the given Bitmap back to the pool.