feat: Replace *NativeMap and *NativeArray with Map<K,V> and List<T> for faster JSI -> JNI calls (#1720)

Replaces `ReadableNativeMap`/`WritableNativeMap` with `Map<String, Object>` and `ReadableNativeArray`/`WritableNativeArray` with `List<Object>`, making the JSI -> JNI conversion a bit faster and more logical.
Also, we could now convert Array Buffers or HostObjects if we wanted to.
This commit is contained in:
Marc Rousavy
2023-08-25 12:22:44 +02:00
committed by GitHub
parent f87bc74de1
commit dfb86e174b
30 changed files with 125 additions and 167 deletions

View File

@@ -1,10 +1,10 @@
#include <jni.h>
#include <fbjni/fbjni.h>
#include "java-bindings/JVisionCameraScheduler.h"
#include "java-bindings/JFrameProcessor.h"
#include "java-bindings/JVisionCameraProxy.h"
#include "JVisionCameraScheduler.h"
#include "JFrameProcessor.h"
#include "JVisionCameraProxy.h"
#include "VisionCameraProxy.h"
#include "skia/SkiaRenderer.h"
#include "SkiaRenderer.h"
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
return facebook::jni::initialize(vm, [] {