package defpackage;

import android.opengl.GLES20;
import android.opengl.GLSurfaceView;
import android.opengl.Matrix;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

/* renamed from: ᵶᵡ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4819 implements GLSurfaceView.Renderer, InterfaceC3649 {

    /* renamed from: ˀᵗᵝᵭ, reason: contains not printable characters */
    public float f17880;

    /* renamed from: ᵡˎ, reason: contains not printable characters */
    public float f17883;

    /* renamed from: ᵡⁱᵥ, reason: contains not printable characters */
    public final float[] f17884;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public final float[] f17886;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final C1367 f17887;

    /* renamed from: ᵮᵠـˌ, reason: contains not printable characters */
    public final /* synthetic */ C0616 f17888;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public final float[] f17889;

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final float[] f17885 = new float[16];

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final float[] f17890 = new float[16];

    /* renamed from: ˑᵥˁ, reason: contains not printable characters */
    public final float[] f17882 = new float[16];

    /* renamed from: ˎˑː, reason: contains not printable characters */
    public final float[] f17881 = new float[16];

    public C4819(C0616 c0616, C1367 c1367) {
        this.f17888 = c0616;
        float[] fArr = new float[16];
        this.f17889 = fArr;
        float[] fArr2 = new float[16];
        this.f17886 = fArr2;
        float[] fArr3 = new float[16];
        this.f17884 = fArr3;
        this.f17887 = c1367;
        Matrix.setIdentityM(fArr, 0);
        Matrix.setIdentityM(fArr2, 0);
        Matrix.setIdentityM(fArr3, 0);
        this.f17883 = 3.1415927f;
    }

    @Override // android.opengl.GLSurfaceView.Renderer
    public final void onDrawFrame(GL10 gl10) {
        synchronized (this) {
            Matrix.multiplyMM(this.f17881, 0, this.f17889, 0, this.f17884, 0);
            Matrix.multiplyMM(this.f17882, 0, this.f17886, 0, this.f17881, 0);
        }
        Matrix.multiplyMM(this.f17890, 0, this.f17885, 0, this.f17882, 0);
        this.f17887.m4221(this.f17890);
    }

    @Override // android.opengl.GLSurfaceView.Renderer
    public final void onSurfaceChanged(GL10 gl10, int i, int i2) {
        GLES20.glViewport(0, 0, i, i2);
        float f = i / i2;
        Matrix.perspectiveM(this.f17885, 0, f > 1.0f ? (float) (Math.toDegrees(Math.atan(Math.tan(Math.toRadians(45.0d)) / f)) * 2.0d) : 90.0f, f, 0.1f, 100.0f);
    }

    @Override // android.opengl.GLSurfaceView.Renderer
    public final synchronized void onSurfaceCreated(GL10 gl10, EGLConfig eGLConfig) {
        C0616 c0616 = this.f17888;
        c0616.f3091.post(new RunnableC5417(c0616, 17, this.f17887.m4220()));
    }

    @Override // defpackage.InterfaceC3649
    /* renamed from: ᵥᵯˎ */
    public final synchronized void mo5887(float[] fArr, float f) {
        float[] fArr2 = this.f17889;
        System.arraycopy(fArr, 0, fArr2, 0, fArr2.length);
        float f2 = -f;
        this.f17883 = f2;
        Matrix.setRotateM(this.f17886, 0, -this.f17880, (float) Math.cos(f2), (float) Math.sin(this.f17883), 0.0f);
    }
}
