From e283c10970a7a0d5136478f4072f620c768f7551 Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Fri, 14 Oct 2022 11:02:22 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 481186706 --- mediapipe/framework/formats/BUILD | 4 ++++ mediapipe/framework/formats/tensor.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mediapipe/framework/formats/BUILD b/mediapipe/framework/formats/BUILD index 44d9bda0b..b967b27fb 100644 --- a/mediapipe/framework/formats/BUILD +++ b/mediapipe/framework/formats/BUILD @@ -462,6 +462,10 @@ cc_library( ], "//conditions:default": [], }), + defines = select({ + "//mediapipe/framework:android_no_jni": ["MEDIAPIPE_NO_JNI"], + "//conditions:default": [], + }), linkopts = select({ "//mediapipe:ios": [ "-framework CoreVideo", diff --git a/mediapipe/framework/formats/tensor.h b/mediapipe/framework/formats/tensor.h index 2c535462b..ff9da3ec6 100644 --- a/mediapipe/framework/formats/tensor.h +++ b/mediapipe/framework/formats/tensor.h @@ -31,11 +31,12 @@ #if MEDIAPIPE_METAL_ENABLED #import #endif // MEDIAPIPE_METAL_ENABLED - +#ifndef MEDIAPIPE_NO_JNI #if __ANDROID_API__ >= 26 || defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__) #define MEDIAPIPE_TENSOR_USE_AHWB 1 #endif // __ANDROID_API__ >= 26 || // defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__) +#endif // MEDIAPIPE_NO_JNI #ifdef MEDIAPIPE_TENSOR_USE_AHWB #include @@ -43,7 +44,6 @@ #include "third_party/GL/gl/include/EGL/egl.h" #include "third_party/GL/gl/include/EGL/eglext.h" #endif // MEDIAPIPE_TENSOR_USE_AHWB - #if MEDIAPIPE_OPENGL_ES_VERSION >= MEDIAPIPE_OPENGL_ES_30 #include "mediapipe/gpu/gl_base.h" #include "mediapipe/gpu/gl_context.h"