what-the-bank/sources/com/kofax/kmc/ken/engines/gpu/GPUStrategy.java

54 lines
1.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.kmc.ken.engines.gpu;
import android.graphics.Bitmap;
/* loaded from: classes3.dex */
public abstract class GPUStrategy {
private IGPUImageHolder ha;
private Rotation hb = Rotation.NORMAL;
private ScaleType hc = ScaleType.CENTER_CROP;
/* JADX INFO: Access modifiers changed from: package-private */
public GPUStrategy(IGPUImageHolder iGPUImageHolder) {
this.ha = null;
this.ha = iGPUImageHolder;
iGPUImageHolder.init();
}
public void handleData(byte[] bArr, int i, int i2, IGPUImageRenderer iGPUImageRenderer) {
this.ha.handleData(bArr, i, i2, iGPUImageRenderer);
}
public Bitmap getBitmap(int i) {
IGPUImageHolder iGPUImageHolder = this.ha;
if (iGPUImageHolder == null) {
return null;
}
return iGPUImageHolder.getBitmap(i);
}
public void destroy() {
IGPUImageHolder iGPUImageHolder = this.ha;
if (iGPUImageHolder != null) {
iGPUImageHolder.destroy();
this.ha = null;
}
}
public void setScaleType(ScaleType scaleType) {
this.hc = scaleType;
}
public void setRotation(Rotation rotation) {
this.hb = rotation;
}
public ScaleType getScaleType() {
return this.hc;
}
public Rotation getRotation() {
return this.hb;
}
}