public ImageWrapperStreamResourceDecoder(Context context) { StreamBitmapDecoder streamBitmapDecoder = new StreamBitmapDecoder(context); FileDescriptorBitmapDecoder fileDescriptorBitmapDecoder = new FileDescriptorBitmapDecoder(context); ImageVideoBitmapDecoder imageVideoBitmapDecoder = new ImageVideoBitmapDecoder(streamBitmapDecoder, fileDescriptorBitmapDecoder); GifResourceDecoder gifResourceDecoder = new GifResourceDecoder(); BitmapPool bitmapPool = Glide.get(context).getBitmapPool(); this.gifBitmapDecoder = new ImageWrapperResourceDecoder(imageVideoBitmapDecoder, gifResourceDecoder, bitmapPool); }
BitmapRequestBuilder(Context context, ModelType model, LoadProvider<ModelType, ImageVideoWrapper, Bitmap, TranscodeType> streamLoadProvider, Class<TranscodeType> transcodeClass, Glide glide) { super(context, model, streamLoadProvider, transcodeClass, glide); this.bitmapPool = glide.getBitmapPool(); imageDecoder = new StreamBitmapDecoder(bitmapPool); videoDecoder = new FileDescriptorBitmapDecoder(bitmapPool); }