package com.bumptech.glide.load.resource.transcode; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import com.bumptech.glide.load.Options; import com.bumptech.glide.load.engine.Resource; import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; import com.bumptech.glide.load.resource.bitmap.BitmapResource; import com.bumptech.glide.load.resource.gif.GifDrawable; /* loaded from: classes.dex */ public final class DrawableBytesTranscoder implements ResourceTranscoder { private final BitmapPool a; private final ResourceTranscoder b; private final ResourceTranscoder c; public DrawableBytesTranscoder(BitmapPool bitmapPool, ResourceTranscoder resourceTranscoder, ResourceTranscoder resourceTranscoder2) { this.a = bitmapPool; this.b = resourceTranscoder; this.c = resourceTranscoder2; } /* JADX WARN: Multi-variable type inference failed */ private static Resource a(Resource resource) { return resource; } @Override // com.bumptech.glide.load.resource.transcode.ResourceTranscoder public Resource a(Resource resource, Options options) { Drawable drawable = resource.get(); if (drawable instanceof BitmapDrawable) { return this.b.a(BitmapResource.a(((BitmapDrawable) drawable).getBitmap(), this.a), options); } if (!(drawable instanceof GifDrawable)) { return null; } ResourceTranscoder resourceTranscoder = this.c; a(resource); return resourceTranscoder.a(resource, options); } }