discord-jadx/app/src/main/java/c/f/j/p/i.java

64 lines
2.1 KiB
Java

package c.f.j.p;
import android.graphics.Bitmap;
import c.f.j.j.c;
import c.f.j.j.d;
import com.airbnb.lottie.parser.AnimatableValueParser;
import com.facebook.common.references.CloseableReference;
import java.util.Objects;
/* compiled from: BitmapPrepareProducer */
public class i implements v0<CloseableReference<c>> {
public final v0<CloseableReference<c>> a;
public final int b;
/* renamed from: c reason: collision with root package name */
public final int f474c;
public final boolean d;
/* compiled from: BitmapPrepareProducer */
public static class a extends p<CloseableReference<c>, CloseableReference<c>> {
/* renamed from: c reason: collision with root package name */
public final int f475c;
public final int d;
public a(l<CloseableReference<c>> lVar, int i, int i2) {
super(lVar);
this.f475c = i;
this.d = i2;
}
@Override // c.f.j.p.b
public void i(Object obj, int i) {
Bitmap bitmap;
int height;
CloseableReference closeableReference = (CloseableReference) obj;
if (closeableReference != null && closeableReference.x()) {
c cVar = (c) closeableReference.w();
if (!cVar.isClosed() && (cVar instanceof d) && (bitmap = ((d) cVar).l) != null && (height = bitmap.getHeight() * bitmap.getRowBytes()) >= this.f475c && height <= this.d) {
bitmap.prepareToDraw();
}
}
this.b.b(closeableReference, i);
}
}
public i(v0<CloseableReference<c>> v0Var, int i, int i2, boolean z2) {
AnimatableValueParser.j(Boolean.valueOf(i <= i2));
Objects.requireNonNull(v0Var);
this.a = v0Var;
this.b = i;
this.f474c = i2;
this.d = z2;
}
@Override // c.f.j.p.v0
public void b(l<CloseableReference<c>> lVar, w0 w0Var) {
if (!w0Var.k() || this.d) {
this.a.b(new a(lVar, this.b, this.f474c), w0Var);
} else {
this.a.b(lVar, w0Var);
}
}
}