package com.bef.effectsdk.view;

import X.4Sh;
import android.content.Context;
import android.os.SystemClock;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.bytedance.librarian.Librarian;
import java.util.Arrays;
import java.util.List;

public class ViewControllerInterface {
    public static final List<String> list;

    public interface NativeMessageListener {
        static {
            Covode.recordClassIndex(2871);
        }

        int nativeOnMsgReceived(long j, long j2, long j3, String str);
    }

    public static native int nativeAddMessageListener(long j, NativeMessageListener nativeMessageListener);

    public static native int nativeAttachEffect(long j, long j2);

    public static native void nativeCreateHandle(long[] jArr);

    public static native void nativeCreateHandle(long[] jArr, int i);

    public static native int nativeCreateTexture(int i, int i2, int i3, int i4, int i5);

    public static native int nativeDeleteTexture(int i);

    public static native int nativeDestroy(long j);

    public static native int nativeInit(long j, int i, int i2);

    public static native void nativeOnPause(long j);

    public static native void nativeOnResume(long j);

    public static native int nativePostMessage(long j, long j2, long j3, long j4, String str);

    public static native int nativeProcess(long j, int i, int i2, int i3, float[] fArr, float[] fArr2, double d);

    public static native int nativeRemoveMessageListener(long j, NativeMessageListener nativeMessageListener);

    public static native int nativeSetRenderCacheData(long j, String str, String str2);

    public static native int nativeSetRenderCacheTexture(long j, String str, String str2);

    public static native int nativeSetRenderCacheTextureWithBuffer(long j, String str, byte[] bArr, int i, int i2);

    public static native int nativeSetResourceFinder(long j, long j2, long j3);

    public static native int nativeSetStickerPath(long j, String str);

    public static native int nativeTouchEvent(long j, int i, int[] iArr, float[] fArr, float[] fArr2, int i2);

    static {
        Covode.recordClassIndex(2870);
        List<String> asList = Arrays.asList(new String[]{"effect"});
        list = asList;
        try {
            for (String INVOKESTATIC_com_bef_effectsdk_view_ViewControllerInterface_com_ss_android_ugc_aweme_lancet_LoadSoLancet_loadLibrary : asList) {
                INVOKESTATIC_com_bef_effectsdk_view_ViewControllerInterface_com_ss_android_ugc_aweme_lancet_LoadSoLancet_loadLibrary(INVOKESTATIC_com_bef_effectsdk_view_ViewControllerInterface_com_ss_android_ugc_aweme_lancet_LoadSoLancet_loadLibrary);
            }
        } catch (Throwable unused) {
        }
    }

    public static void INVOKESTATIC_com_bef_effectsdk_view_ViewControllerInterface_com_ss_android_ugc_aweme_lancet_LoadSoLancet_loadLibrary(String str) {
        long uptimeMillis = SystemClock.uptimeMillis();
        Librarian.LIZ(str, false, (Context) null);
        4Sh.LIZ(uptimeMillis, str);
    }

    public static void createHandle(long[] jArr) {
        MethodCollector.i(16277);
        nativeCreateHandle(jArr, 0);
        MethodCollector.o(16277);
    }

    public static int deleteTexture(int i) {
        MethodCollector.i(8050);
        int nativeDeleteTexture = nativeDeleteTexture(i);
        MethodCollector.o(8050);
        return nativeDeleteTexture;
    }

    public static int destroy(long j) {
        MethodCollector.i(11159);
        int nativeDestroy = nativeDestroy(j);
        MethodCollector.o(11159);
        return nativeDestroy;
    }

    public static void onPause(long j) {
        MethodCollector.i(6552);
        nativeOnPause(j);
        MethodCollector.o(6552);
    }

    public static void onResume(long j) {
        MethodCollector.i(6555);
        nativeOnResume(j);
        MethodCollector.o(6555);
    }

    public static int addMessageListener(long j, NativeMessageListener nativeMessageListener) {
        MethodCollector.i(7665);
        int nativeAddMessageListener = nativeAddMessageListener(j, nativeMessageListener);
        MethodCollector.o(7665);
        return nativeAddMessageListener;
    }

    public static int attachEffect(long j, long j2) {
        MethodCollector.i(13864);
        int nativeAttachEffect = nativeAttachEffect(j, j2);
        MethodCollector.o(13864);
        return nativeAttachEffect;
    }

    public static int removeMessageListener(long j, NativeMessageListener nativeMessageListener) {
        MethodCollector.i(7849);
        int nativeRemoveMessageListener = nativeRemoveMessageListener(j, nativeMessageListener);
        MethodCollector.o(7849);
        return nativeRemoveMessageListener;
    }

    public static int setStickerPath(long j, String str) {
        MethodCollector.i(13865);
        int nativeSetStickerPath = nativeSetStickerPath(j, str);
        MethodCollector.o(13865);
        return nativeSetStickerPath;
    }

    public static void createHandle(long[] jArr, int i) {
        MethodCollector.i(13533);
        nativeCreateHandle(jArr, i);
        MethodCollector.o(13533);
    }

    public static int init(long j, int i, int i2) {
        MethodCollector.i(13863);
        int nativeInit = nativeInit(j, i, i2);
        MethodCollector.o(13863);
        return nativeInit;
    }

    public static int setRenderCacheData(long j, String str, String str2) {
        MethodCollector.i(8258);
        int nativeSetRenderCacheData = nativeSetRenderCacheData(j, str, str2);
        MethodCollector.o(8258);
        return nativeSetRenderCacheData;
    }

    public static int setRenderCacheTexture(long j, String str, String str2) {
        MethodCollector.i(8260);
        int nativeSetRenderCacheTexture = nativeSetRenderCacheTexture(j, str, str2);
        MethodCollector.o(8260);
        return nativeSetRenderCacheTexture;
    }

    public static int setResourceFinder(long j, long j2, long j3) {
        MethodCollector.i(8456);
        int nativeSetResourceFinder = nativeSetResourceFinder(j, j2, j3);
        MethodCollector.o(8456);
        return nativeSetResourceFinder;
    }

    public static int touchBeginEvent(long j, int[] iArr, float[] fArr, float[] fArr2) {
        MethodCollector.i(11391);
        int[] iArr2 = iArr;
        float[] fArr3 = fArr;
        int nativeTouchEvent = nativeTouchEvent(j, 0, iArr2, fArr3, fArr2, iArr2.length);
        MethodCollector.o(11391);
        return nativeTouchEvent;
    }

    public static int touchEndEvent(long j, int[] iArr, float[] fArr, float[] fArr2) {
        MethodCollector.i(11628);
        int[] iArr2 = iArr;
        float[] fArr3 = fArr;
        int nativeTouchEvent = nativeTouchEvent(j, 1, iArr2, fArr3, fArr2, iArr2.length);
        MethodCollector.o(11628);
        return nativeTouchEvent;
    }

    public static int touchMoveEvent(long j, int[] iArr, float[] fArr, float[] fArr2) {
        MethodCollector.i(11627);
        int[] iArr2 = iArr;
        float[] fArr3 = fArr;
        int nativeTouchEvent = nativeTouchEvent(j, 2, iArr2, fArr3, fArr2, iArr2.length);
        MethodCollector.o(11627);
        return nativeTouchEvent;
    }

    public static int createTexture(int i, int i2, int i3, int i4, int i5) {
        MethodCollector.i(8048);
        int nativeCreateTexture = nativeCreateTexture(i, i2, i3, i4, i5);
        MethodCollector.o(8048);
        return nativeCreateTexture;
    }

    public static int postMessage(long j, long j2, long j3, long j4, String str) {
        MethodCollector.i(12073);
        int nativePostMessage = nativePostMessage(j, j2, j3, j4, str);
        MethodCollector.o(12073);
        return nativePostMessage;
    }

    public static int setRenderCacheTextureWithBuffer(long j, String str, byte[] bArr, int i, int i2) {
        MethodCollector.i(8262);
        int nativeSetRenderCacheTextureWithBuffer = nativeSetRenderCacheTextureWithBuffer(j, str, bArr, i, i2);
        MethodCollector.o(8262);
        return nativeSetRenderCacheTextureWithBuffer;
    }

    public static int touchBeginEvent(long j, int[] iArr, float[] fArr, float[] fArr2, int i) {
        MethodCollector.i(11865);
        int nativeTouchEvent = nativeTouchEvent(j, 0, iArr, fArr, fArr2, i);
        MethodCollector.o(11865);
        return nativeTouchEvent;
    }

    public static int touchEndEvent(long j, int[] iArr, float[] fArr, float[] fArr2, int i) {
        MethodCollector.i(12072);
        int nativeTouchEvent = nativeTouchEvent(j, 1, iArr, fArr, fArr2, i);
        MethodCollector.o(12072);
        return nativeTouchEvent;
    }

    public static int touchMoveEvent(long j, int[] iArr, float[] fArr, float[] fArr2, int i) {
        MethodCollector.i(12071);
        int nativeTouchEvent = nativeTouchEvent(j, 2, iArr, fArr, fArr2, i);
        MethodCollector.o(12071);
        return nativeTouchEvent;
    }

    public static int processFrame(long j, int i, int i2, int i3, float[] fArr, float[] fArr2, double d) {
        MethodCollector.i(6377);
        int nativeProcess = nativeProcess(j, i, i2, i3, fArr, fArr2, d);
        MethodCollector.o(6377);
        return nativeProcess;
    }
}
