use threadpool on C API
This commit is contained in:
@@ -74,7 +74,7 @@ static void freeResource(uint32_t id) {
|
||||
|
||||
extern "C" {
|
||||
|
||||
void* filament_viewer_new_android(
|
||||
void* create_filament_viewer_android(
|
||||
jobject surface,
|
||||
JNIEnv* env,
|
||||
jobject assetManager
|
||||
|
||||
@@ -18,13 +18,13 @@ import java.nio.ByteBuffer
|
||||
|
||||
interface FilamentInterop : Library {
|
||||
|
||||
fun filament_viewer_new_android(
|
||||
fun create_filament_viewer_android(
|
||||
layer:Object,
|
||||
env:JNIEnv,
|
||||
am:AssetManager
|
||||
) : Pointer;
|
||||
|
||||
fun filament_viewer_delete(
|
||||
fun delete_filament_viewer(
|
||||
viewer:Pointer,
|
||||
) : Pointer;
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ class PolyvoxFilamentPlugin: FlutterPlugin, MethodCallHandler, ActivityAware {
|
||||
executor.execute {
|
||||
|
||||
if(_viewer != null) {
|
||||
_lib.filament_viewer_delete(_viewer!!);
|
||||
_lib.delete_filament_viewer(_viewer!!);
|
||||
_viewer = null;
|
||||
}
|
||||
if(surfaceTexture != null) {
|
||||
@@ -193,7 +193,7 @@ class PolyvoxFilamentPlugin: FlutterPlugin, MethodCallHandler, ActivityAware {
|
||||
|
||||
surface = Surface(surfaceTexture!!)
|
||||
|
||||
_viewer = _lib.filament_viewer_new_android(
|
||||
_viewer = _lib.create_filament_viewer_android(
|
||||
surface as Object,
|
||||
JNIEnv.CURRENT,
|
||||
(activity as Context).assets)
|
||||
|
||||
Reference in New Issue
Block a user