29 lines
978 B
Java
29 lines
978 B
Java
package com.bumptech.glide.load.resource.bitmap;
|
|
|
|
import android.graphics.Bitmap;
|
|
import com.bumptech.glide.load.Options;
|
|
import com.bumptech.glide.load.ResourceDecoder;
|
|
import com.bumptech.glide.load.engine.Resource;
|
|
import com.bumptech.glide.util.ByteBufferUtil;
|
|
import java.io.IOException;
|
|
import java.nio.ByteBuffer;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class ByteBufferBitmapDecoder implements ResourceDecoder<ByteBuffer, Bitmap> {
|
|
private final Downsampler a;
|
|
|
|
public ByteBufferBitmapDecoder(Downsampler downsampler) {
|
|
this.a = downsampler;
|
|
}
|
|
|
|
@Override // com.bumptech.glide.load.ResourceDecoder
|
|
public boolean a(ByteBuffer byteBuffer, Options options) {
|
|
return this.a.a(byteBuffer);
|
|
}
|
|
|
|
@Override // com.bumptech.glide.load.ResourceDecoder
|
|
public Resource<Bitmap> a(ByteBuffer byteBuffer, int i, int i2, Options options) throws IOException {
|
|
return this.a.a(ByteBufferUtil.c(byteBuffer), i, i2, options);
|
|
}
|
|
}
|