package o;

import android.graphics.Matrix;
import android.view.View;
import java.util.ArrayList;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Tf, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0498Tf implements InterfaceC0472Sf {
    public final int[] a;
    public final float[] b;

    public C0498Tf(ArrayList arrayList, ArrayList arrayList2) {
        int size = arrayList.size();
        this.a = new int[size];
        this.b = new float[size];
        for (int i = 0; i < size; i++) {
            this.a[i] = ((Integer) arrayList.get(i)).intValue();
            this.b[i] = ((Float) arrayList2.get(i)).floatValue();
        }
    }

    @Override // o.InterfaceC0472Sf
    public void a(View view, float[] fArr) {
        C1570jO.d(fArr);
        b(view, fArr);
    }

    public void b(View view, float[] fArr) {
        Object parent = view.getParent();
        boolean z = parent instanceof View;
        float[] fArr2 = this.b;
        if (z) {
            b((View) parent, fArr);
            C1570jO.d(fArr2);
            C1570jO.f(fArr2, -view.getScrollX(), -view.getScrollY());
            F3.I(fArr, fArr2);
            float left = view.getLeft();
            float top = view.getTop();
            C1570jO.d(fArr2);
            C1570jO.f(fArr2, left, top);
            F3.I(fArr, fArr2);
        } else {
            int[] iArr = this.a;
            view.getLocationInWindow(iArr);
            C1570jO.d(fArr2);
            C1570jO.f(fArr2, -view.getScrollX(), -view.getScrollY());
            F3.I(fArr, fArr2);
            float f = iArr[0];
            float f2 = iArr[1];
            C1570jO.d(fArr2);
            C1570jO.f(fArr2, f, f2);
            F3.I(fArr, fArr2);
        }
        Matrix matrix = view.getMatrix();
        if (matrix.isIdentity()) {
            return;
        }
        F3.Q(matrix, fArr2);
        F3.I(fArr, fArr2);
    }

    public C0498Tf(int i, int i2) {
        this.a = new int[]{i, i2};
        this.b = new float[]{0.0f, 1.0f};
    }

    public C0498Tf(int i, int i2, int i3) {
        this.a = new int[]{i, i2, i3};
        this.b = new float[]{0.0f, 0.5f, 1.0f};
    }

    public C0498Tf(float[] fArr) {
        this.b = fArr;
        this.a = new int[2];
    }
}
