Initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package com.bumptech.glide.load.resource.bitmap;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import com.bumptech.glide.load.Options;
|
||||
import com.bumptech.glide.load.ResourceDecoder;
|
||||
import com.bumptech.glide.load.engine.Resource;
|
||||
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
|
||||
import com.bumptech.glide.load.resource.drawable.ResourceDrawableDecoder;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class ResourceBitmapDecoder implements ResourceDecoder<Uri, Bitmap> {
|
||||
private final ResourceDrawableDecoder a;
|
||||
private final BitmapPool b;
|
||||
|
||||
public ResourceBitmapDecoder(ResourceDrawableDecoder resourceDrawableDecoder, BitmapPool bitmapPool) {
|
||||
this.a = resourceDrawableDecoder;
|
||||
this.b = bitmapPool;
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.ResourceDecoder
|
||||
public boolean a(Uri uri, Options options) {
|
||||
return "android.resource".equals(uri.getScheme());
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.load.ResourceDecoder
|
||||
public Resource<Bitmap> a(Uri uri, int i, int i2, Options options) {
|
||||
Resource<Drawable> a = this.a.a(uri, i, i2, options);
|
||||
if (a == null) {
|
||||
return null;
|
||||
}
|
||||
return DrawableToBitmapConverter.a(this.b, a.get(), i, i2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user