2021-06-27 20:44:35 +00:00
|
|
|
package c.f.j.p;
|
|
|
|
|
|
|
|
import c.f.d.d.f;
|
|
|
|
import c.f.j.c.i;
|
|
|
|
import c.f.j.c.n;
|
|
|
|
import c.f.j.c.w;
|
|
|
|
import c.f.j.j.c;
|
|
|
|
import c.f.j.q.b;
|
|
|
|
import com.facebook.cache.common.CacheKey;
|
|
|
|
import com.facebook.common.references.CloseableReference;
|
|
|
|
import com.facebook.imagepipeline.request.ImageRequest;
|
|
|
|
import java.util.Map;
|
|
|
|
/* compiled from: PostprocessedBitmapMemoryCacheProducer */
|
|
|
|
public class r0 implements v0<CloseableReference<c>> {
|
|
|
|
public final w<CacheKey, c> a;
|
|
|
|
public final i b;
|
|
|
|
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
2021-07-13 20:23:20 +00:00
|
|
|
public final v0<CloseableReference<c>> f493c;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
/* compiled from: PostprocessedBitmapMemoryCacheProducer */
|
|
|
|
public static class a extends p<CloseableReference<c>, CloseableReference<c>> {
|
|
|
|
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
2021-07-13 20:23:20 +00:00
|
|
|
public final CacheKey f494c;
|
2021-06-27 20:44:35 +00:00
|
|
|
public final boolean d;
|
|
|
|
public final w<CacheKey, c> e;
|
|
|
|
public final boolean f;
|
|
|
|
|
|
|
|
public a(l<CloseableReference<c>> lVar, CacheKey cacheKey, boolean z2, w<CacheKey, c> wVar, boolean z3) {
|
|
|
|
super(lVar);
|
2021-07-13 20:23:20 +00:00
|
|
|
this.f494c = cacheKey;
|
2021-06-27 20:44:35 +00:00
|
|
|
this.d = z2;
|
|
|
|
this.e = wVar;
|
|
|
|
this.f = z3;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // c.f.j.p.b
|
|
|
|
public void i(Object obj, int i) {
|
|
|
|
CloseableReference<c> closeableReference = (CloseableReference) obj;
|
|
|
|
CloseableReference<c> closeableReference2 = null;
|
|
|
|
if (closeableReference == null) {
|
|
|
|
if (b.e(i)) {
|
|
|
|
this.b.b(null, i);
|
|
|
|
}
|
|
|
|
} else if (!b.f(i) || this.d) {
|
|
|
|
if (this.f) {
|
2021-07-13 20:23:20 +00:00
|
|
|
closeableReference2 = this.e.a(this.f494c, closeableReference);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
try {
|
|
|
|
this.b.a(1.0f);
|
|
|
|
l<O> lVar = this.b;
|
|
|
|
if (closeableReference2 != null) {
|
|
|
|
closeableReference = closeableReference2;
|
|
|
|
}
|
|
|
|
lVar.b(closeableReference, i);
|
|
|
|
} finally {
|
|
|
|
Class<CloseableReference> cls = CloseableReference.i;
|
|
|
|
if (closeableReference2 != null) {
|
|
|
|
closeableReference2.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public r0(w<CacheKey, c> wVar, i iVar, v0<CloseableReference<c>> v0Var) {
|
|
|
|
this.a = wVar;
|
|
|
|
this.b = iVar;
|
2021-07-13 20:23:20 +00:00
|
|
|
this.f493c = v0Var;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // c.f.j.p.v0
|
|
|
|
public void b(l<CloseableReference<c>> lVar, w0 w0Var) {
|
|
|
|
y0 o = w0Var.o();
|
|
|
|
ImageRequest e = w0Var.e();
|
|
|
|
Object b = w0Var.b();
|
|
|
|
b bVar = e.q;
|
|
|
|
if (bVar == null || bVar.getPostprocessorCacheKey() == null) {
|
2021-07-13 20:23:20 +00:00
|
|
|
this.f493c.b(lVar, w0Var);
|
2021-06-27 20:44:35 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
o.e(w0Var, "PostprocessedBitmapMemoryCacheProducer");
|
|
|
|
CacheKey c2 = ((n) this.b).c(e, b);
|
|
|
|
CloseableReference<c> closeableReference = this.a.get(c2);
|
|
|
|
Map<String, String> map = null;
|
|
|
|
if (closeableReference != null) {
|
|
|
|
if (o.g(w0Var, "PostprocessedBitmapMemoryCacheProducer")) {
|
|
|
|
map = f.of("cached_value_found", "true");
|
|
|
|
}
|
|
|
|
o.j(w0Var, "PostprocessedBitmapMemoryCacheProducer", map);
|
|
|
|
o.c(w0Var, "PostprocessedBitmapMemoryCacheProducer", true);
|
|
|
|
w0Var.i("memory_bitmap", "postprocessed");
|
|
|
|
lVar.a(1.0f);
|
|
|
|
lVar.b(closeableReference, 1);
|
|
|
|
closeableReference.close();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
a aVar = new a(lVar, c2, bVar instanceof c.f.j.q.c, this.a, w0Var.e().o);
|
|
|
|
if (o.g(w0Var, "PostprocessedBitmapMemoryCacheProducer")) {
|
|
|
|
map = f.of("cached_value_found", "false");
|
|
|
|
}
|
|
|
|
o.j(w0Var, "PostprocessedBitmapMemoryCacheProducer", map);
|
2021-07-13 20:23:20 +00:00
|
|
|
this.f493c.b(aVar, w0Var);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|