Class GifBitmapProvider

java.lang.Object
com.bumptech.glide.load.resource.gif.GifBitmapProvider
All Implemented Interfaces:
com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider

public final class GifBitmapProvider extends Object implements com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider
Implements GifDecoder.BitmapProvider by wrapping Glide's BitmapPool.
  • Constructor Details

    • GifBitmapProvider

      public GifBitmapProvider(BitmapPool bitmapPool)
      Constructs an instance without a shared byte array pool. Byte arrays will be always constructed when requested.
    • GifBitmapProvider

      public GifBitmapProvider(BitmapPool bitmapPool, @Nullable ArrayPool arrayPool)
      Constructs an instance with a shared array pool. Arrays will be reused where possible.
  • Method Details

    • obtain

      @NonNull public Bitmap obtain(int width, int height, @NonNull Bitmap.Config config)
      Specified by:
      obtain in interface com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider
    • release

      public void release(@NonNull Bitmap bitmap)
      Specified by:
      release in interface com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider
    • obtainByteArray

      @NonNull public byte[] obtainByteArray(int size)
      Specified by:
      obtainByteArray in interface com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider
    • release

      public void release(@NonNull byte[] bytes)
      Specified by:
      release in interface com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider
    • obtainIntArray

      @NonNull public int[] obtainIntArray(int size)
      Specified by:
      obtainIntArray in interface com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider
    • release

      public void release(@NonNull int[] array)
      Specified by:
      release in interface com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider