Class GifBitmapProvider

  • All Implemented Interfaces:
    com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider

    public final class GifBitmapProvider
    extends java.lang.Object
    implements com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider
    Implements GifDecoder.BitmapProvider by wrapping Glide's BitmapPool.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      android.graphics.Bitmap obtain​(int width, int height, android.graphics.Bitmap.Config config)  
      byte[] obtainByteArray​(int size)  
      int[] obtainIntArray​(int size)  
      void release​(byte[] bytes)  
      void release​(int[] array)  
      void release​(android.graphics.Bitmap bitmap)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • 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 Detail

      • obtain

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

        public void release​(@NonNull
                            android.graphics.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