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

32 lines
1.1 KiB
Java

package com.bumptech.glide.load.resource.bitmap;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import com.bumptech.glide.load.EncodeStrategy;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.ResourceEncoder;
import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import java.io.File;
/* loaded from: classes.dex */
public class BitmapDrawableEncoder implements ResourceEncoder<BitmapDrawable> {
private final BitmapPool a;
private final ResourceEncoder<Bitmap> b;
public BitmapDrawableEncoder(BitmapPool bitmapPool, ResourceEncoder<Bitmap> resourceEncoder) {
this.a = bitmapPool;
this.b = resourceEncoder;
}
@Override // com.bumptech.glide.load.Encoder
public boolean a(Resource<BitmapDrawable> resource, File file, Options options) {
return this.b.a(new BitmapResource(resource.get().getBitmap(), this.a), file, options);
}
@Override // com.bumptech.glide.load.ResourceEncoder
public EncodeStrategy a(Options options) {
return this.b.a(options);
}
}