package o;

import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Outline;
import android.graphics.Paint;
import android.graphics.RecordingCanvas;
import android.graphics.RenderNode;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.jE, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1560jE implements InterfaceC1178fE {
    public final C0006Ag b;
    public final C3113zg c;
    public final RenderNode d;
    public long e;
    public Paint f;
    public Matrix g;
    public boolean h;
    public float i;
    public int j;
    public float k;
    public float l;
    public float m;
    public long n;

    /* renamed from: o, reason: collision with root package name */
    public long f595o;
    public float p;
    public boolean q;
    public boolean r;
    public boolean s;
    public int t;

    public C1560jE() {
        C0006Ag c0006Ag = new C0006Ag();
        C3113zg c3113zg = new C3113zg();
        this.b = c0006Ag;
        this.c = c3113zg;
        RenderNode renderNodeC = AbstractC0700aE.c();
        this.d = renderNodeC;
        this.e = 0L;
        renderNodeC.setClipToBounds(false);
        O(renderNodeC, 0);
        this.i = 1.0f;
        this.j = 3;
        this.k = 1.0f;
        this.l = 1.0f;
        long j = C0190Hi.b;
        this.n = j;
        this.f595o = j;
        this.p = 8.0f;
        this.t = 0;
    }

    @Override // o.InterfaceC1178fE
    public final void A(float f) {
        this.l = f;
        this.d.setScaleY(f);
    }

    @Override // o.InterfaceC1178fE
    public final void B(InterfaceC2923xg interfaceC2923xg) {
        Canvas canvas = U2.a;
        ((T2) interfaceC2923xg).a.drawRenderNode(this.d);
    }

    @Override // o.InterfaceC1178fE
    public final Matrix C() {
        Matrix matrix = this.g;
        if (matrix == null) {
            matrix = new Matrix();
            this.g = matrix;
        }
        this.d.getMatrix(matrix);
        return matrix;
    }

    @Override // o.InterfaceC1178fE
    public final void D(int i, int i2, long j) {
        this.d.setPosition(i, i2, ((int) (j >> 32)) + i, ((int) (4294967295L & j)) + i2);
        this.e = C1884mi0.O(j);
    }

    @Override // o.InterfaceC1178fE
    public final float E() {
        return 0.0f;
    }

    @Override // o.InterfaceC1178fE
    public final void F(float f) {
        this.p = f;
        this.d.setCameraDistance(f);
    }

    @Override // o.InterfaceC1178fE
    public final float G() {
        return this.m;
    }

    @Override // o.InterfaceC1178fE
    public final boolean H() {
        return this.d.hasDisplayList();
    }

    @Override // o.InterfaceC1178fE
    public final float I() {
        return this.l;
    }

    @Override // o.InterfaceC1178fE
    public final float J() {
        return 0.0f;
    }

    @Override // o.InterfaceC1178fE
    public final int K() {
        return this.j;
    }

    @Override // o.InterfaceC1178fE
    public final void L(long j) {
        if ((9223372034707292159L & j) == 9205357640488583168L) {
            this.d.resetPivot();
        } else {
            this.d.setPivotX(Float.intBitsToFloat((int) (j >> 32)));
            this.d.setPivotY(Float.intBitsToFloat((int) (j & 4294967295L)));
        }
    }

    @Override // o.InterfaceC1178fE
    public final long M() {
        return this.n;
    }

    public final void N() {
        boolean z = this.q;
        boolean z2 = false;
        boolean z3 = z && !this.h;
        if (z && this.h) {
            z2 = true;
        }
        if (z3 != this.r) {
            this.r = z3;
            this.d.setClipToBounds(z3);
        }
        if (z2 != this.s) {
            this.s = z2;
            this.d.setClipToOutline(z2);
        }
    }

    public final void O(RenderNode renderNode, int i) {
        if (i == 1) {
            renderNode.setUseCompositingLayer(true, this.f);
            renderNode.setHasOverlappingRendering(true);
        } else if (i == 2) {
            renderNode.setUseCompositingLayer(false, this.f);
            renderNode.setHasOverlappingRendering(false);
        } else {
            renderNode.setUseCompositingLayer(false, this.f);
            renderNode.setHasOverlappingRendering(true);
        }
    }

    public final void P() {
        int i = this.t;
        if (i != 1 && this.j == 3) {
            O(this.d, i);
        } else {
            O(this.d, 1);
        }
    }

    @Override // o.InterfaceC1178fE
    public final float a() {
        return this.i;
    }

    @Override // o.InterfaceC1178fE
    public final void b() {
        this.d.setRotationX(0.0f);
    }

    @Override // o.InterfaceC1178fE
    public final void c(float f) {
        this.i = f;
        this.d.setAlpha(f);
    }

    @Override // o.InterfaceC1178fE
    public final void d(InterfaceC2281qr interfaceC2281qr, EnumC1280gK enumC1280gK, C1082eE c1082eE, C2769w c2769w) {
        C3113zg c3113zg = this.c;
        RecordingCanvas recordingCanvasBeginRecording = this.d.beginRecording();
        try {
            C0006Ag c0006Ag = this.b;
            T2 t2 = c0006Ag.a;
            Canvas canvas = t2.a;
            t2.a = recordingCanvasBeginRecording;
            C3126zm0 c3126zm0 = c3113zg.m;
            c3126zm0.R(interfaceC2281qr);
            c3126zm0.S(enumC1280gK);
            c3126zm0.n = c1082eE;
            c3126zm0.T(this.e);
            c3126zm0.Q(t2);
            c2769w.g(c3113zg);
            c0006Ag.a.a = canvas;
        } finally {
            this.d.endRecording();
        }
    }

    @Override // o.InterfaceC1178fE
    public final float e() {
        return this.k;
    }

    @Override // o.InterfaceC1178fE
    public final void f(float f) {
        this.m = f;
        this.d.setElevation(f);
    }

    @Override // o.InterfaceC1178fE
    public final float g() {
        return 0.0f;
    }

    @Override // o.InterfaceC1178fE
    public final void h() {
        this.d.setTranslationY(0.0f);
    }

    @Override // o.InterfaceC1178fE
    public final void i() {
        this.d.setRotationY(0.0f);
    }

    @Override // o.InterfaceC1178fE
    public final long j() {
        return this.f595o;
    }

    @Override // o.InterfaceC1178fE
    public final void k(long j) {
        this.n = j;
        this.d.setAmbientShadowColor(AbstractC0752ap.g0(j));
    }

    @Override // o.InterfaceC1178fE
    public final void l(Outline outline, long j) {
        this.d.setOutline(outline);
        this.h = outline != null;
        N();
    }

    @Override // o.InterfaceC1178fE
    public final void m() {
        Paint paint = this.f;
        if (paint == null) {
            paint = new Paint();
            this.f = paint;
        }
        paint.setColorFilter(null);
        P();
    }

    @Override // o.InterfaceC1178fE
    public final void n(float f) {
        this.k = f;
        this.d.setScaleX(f);
    }

    @Override // o.InterfaceC1178fE
    public final void o(int i) {
        this.j = i;
        Paint paint = this.f;
        if (paint == null) {
            paint = new Paint();
            this.f = paint;
        }
        paint.setBlendMode(AbstractC1692kh0.O(i));
        P();
    }

    @Override // o.InterfaceC1178fE
    public final float p() {
        return this.p;
    }

    @Override // o.InterfaceC1178fE
    public final void q() {
        this.d.discardDisplayList();
    }

    @Override // o.InterfaceC1178fE
    public final float r() {
        return 0.0f;
    }

    @Override // o.InterfaceC1178fE
    public final void s() {
        this.d.setTranslationX(0.0f);
    }

    @Override // o.InterfaceC1178fE
    public final void t(boolean z) {
        this.q = z;
        N();
    }

    @Override // o.InterfaceC1178fE
    public final int u() {
        return this.t;
    }

    @Override // o.InterfaceC1178fE
    public final float v() {
        return 0.0f;
    }

    @Override // o.InterfaceC1178fE
    public final C0444Rd w() {
        return null;
    }

    @Override // o.InterfaceC1178fE
    public final void x(int i) {
        this.t = i;
        P();
    }

    @Override // o.InterfaceC1178fE
    public final void y() {
        this.d.setRotationZ(0.0f);
    }

    @Override // o.InterfaceC1178fE
    public final void z(long j) {
        this.f595o = j;
        this.d.setSpotShadowColor(AbstractC0752ap.g0(j));
    }
}
