jimu-decompiled/sources/com/bumptech/glide/load/resource/bitmap/BitmapDrawableDecoder.java
2025-05-13 19:24:51 +02:00

34 lines
1.3 KiB
Java

package com.bumptech.glide.load.resource.bitmap;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.ResourceDecoder;
import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.util.Preconditions;
import java.io.IOException;
/* loaded from: classes.dex */
public class BitmapDrawableDecoder<DataType> implements ResourceDecoder<DataType, BitmapDrawable> {
private final ResourceDecoder<DataType, Bitmap> a;
private final Resources b;
public BitmapDrawableDecoder(Resources resources, ResourceDecoder<DataType, Bitmap> resourceDecoder) {
Preconditions.a(resources);
this.b = resources;
Preconditions.a(resourceDecoder);
this.a = resourceDecoder;
}
@Override // com.bumptech.glide.load.ResourceDecoder
public boolean a(DataType datatype, Options options) throws IOException {
return this.a.a(datatype, options);
}
@Override // com.bumptech.glide.load.ResourceDecoder
public Resource<BitmapDrawable> a(DataType datatype, int i, int i2, Options options) throws IOException {
return LazyBitmapDrawableResource.a(this.b, this.a.a(datatype, i, i2, options));
}
}