package k5;

import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import com.bumptech.glide.load.engine.a0;
import com.bumptech.glide.load.engine.e0;
import t5.n;

/* JADX INFO: loaded from: classes.dex */
public abstract class c implements e0, a0 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final Drawable f29071a;

    public c(Drawable drawable) {
        this.f29071a = (Drawable) n.checkNotNull(drawable);
    }

    @Override // com.bumptech.glide.load.engine.e0
    public final Object get() {
        Drawable drawable = this.f29071a;
        Drawable.ConstantState constantState = drawable.getConstantState();
        return constantState == null ? drawable : constantState.newDrawable();
    }

    @Override // com.bumptech.glide.load.engine.a0
    public void initialize() {
        Drawable drawable = this.f29071a;
        if (drawable instanceof BitmapDrawable) {
            ((BitmapDrawable) drawable).getBitmap().prepareToDraw();
        } else if (drawable instanceof l5.d) {
            ((l5.d) drawable).f30126a.f30125a.f30154l.prepareToDraw();
        }
    }
}
