package defpackage;

import android.content.Context;
import android.graphics.Bitmap;
import com.bumptech.glide.a;

/* JADX INFO: loaded from: classes3.dex */
public abstract class db0 implements et9<Bitmap> {
    @Override // defpackage.et9
    public final b28 a(Context context, b28 b28Var, int i, int i2) {
        if (!hda.j(i, i2)) {
            throw new IllegalArgumentException(n41.l("Cannot apply transformation on width: ", i, " or height: ", " less than or equal to zero and not Target.SIZE_ORIGINAL", i2));
        }
        xa0 xa0Var = a.b(context).b;
        Bitmap bitmap = (Bitmap) b28Var.get();
        if (i == Integer.MIN_VALUE) {
            i = bitmap.getWidth();
        }
        int i3 = i;
        if (i2 == Integer.MIN_VALUE) {
            i2 = bitmap.getHeight();
        }
        Bitmap bitmapC = c(context.getApplicationContext(), xa0Var, bitmap, i3, i2);
        return bitmap.equals(bitmapC) ? b28Var : bb0.b(xa0Var, bitmapC);
    }

    public abstract Bitmap c(Context context, xa0 xa0Var, Bitmap bitmap, int i, int i2);
}
