54 lines
1.3 KiB
Java
54 lines
1.3 KiB
Java
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;
|
|
}
|
|
}
|