package com.bumptech.glide.load.resource.gif; import android.graphics.Bitmap; import com.bumptech.glide.gifdecoder.GifDecoder; import com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool; import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; /* loaded from: classes.dex */ public final class GifBitmapProvider implements GifDecoder.BitmapProvider { private final BitmapPool a; private final ArrayPool b; public GifBitmapProvider(BitmapPool bitmapPool, ArrayPool arrayPool) { this.a = bitmapPool; this.b = arrayPool; } @Override // com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider public Bitmap a(int i, int i2, Bitmap.Config config) { return this.a.b(i, i2, config); } @Override // com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider public byte[] b(int i) { ArrayPool arrayPool = this.b; return arrayPool == null ? new byte[i] : (byte[]) arrayPool.b(i, byte[].class); } @Override // com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider public void a(Bitmap bitmap) { this.a.a(bitmap); } @Override // com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider public void a(byte[] bArr) { ArrayPool arrayPool = this.b; if (arrayPool == null) { return; } arrayPool.put(bArr); } @Override // com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider public int[] a(int i) { ArrayPool arrayPool = this.b; if (arrayPool == null) { return new int[i]; } return (int[]) arrayPool.b(i, int[].class); } @Override // com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider public void a(int[] iArr) { ArrayPool arrayPool = this.b; if (arrayPool == null) { return; } arrayPool.put(iArr); } }