kotlin impl, avoid message passing overhead
This commit is contained in:
13
mobile/android/app/src/main/cpp/native_buffer.c
Normal file
13
mobile/android/app/src/main/cpp/native_buffer.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <jni.h>
|
||||
|
||||
JNIEXPORT jobject JNICALL
|
||||
Java_app_alextran_immich_images_ThumbnailsImpl_00024Companion_wrapPointer(
|
||||
JNIEnv *env, jclass clazz, jlong address, jint capacity) {
|
||||
return (*env)->NewDirectByteBuffer(env, (void*)address, capacity);
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL
|
||||
Java_app_alextran_immich_images_ThumbnailsImpl_wrapPointer(
|
||||
JNIEnv *env, jclass clazz, jlong address, jint capacity) {
|
||||
return (*env)->NewDirectByteBuffer(env, (void*)address, capacity);
|
||||
}
|
||||
Reference in New Issue
Block a user