diff options
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/Android.mk | 1 | ||||
-rw-r--r-- | core/jni/AndroidRuntime.cpp | 3 | ||||
-rw-r--r-- | core/jni/android_util_FloatMath.cpp | 61 |
3 files changed, 0 insertions, 65 deletions
diff --git a/core/jni/Android.mk b/core/jni/Android.mk index 0cb0ea0..245e0d2 100644 --- a/core/jni/Android.mk +++ b/core/jni/Android.mk @@ -85,7 +85,6 @@ LOCAL_SRC_FILES:= \ android_util_Binder.cpp \ android_util_EventLog.cpp \ android_util_Log.cpp \ - android_util_FloatMath.cpp \ android_util_Process.cpp \ android_util_StringBlock.cpp \ android_util_XmlBlock.cpp \ diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 4159792..8bb3173 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -95,8 +95,6 @@ extern int register_android_media_AudioTrack(JNIEnv *env); extern int register_android_media_JetPlayer(JNIEnv *env); extern int register_android_media_ToneGenerator(JNIEnv *env); -extern int register_android_util_FloatMath(JNIEnv* env); - namespace android { /* @@ -1228,7 +1226,6 @@ static const RegJNIRec gRegJNI[] = { REG_JNI(register_android_os_SystemClock), REG_JNI(register_android_util_EventLog), REG_JNI(register_android_util_Log), - REG_JNI(register_android_util_FloatMath), REG_JNI(register_android_content_AssetManager), REG_JNI(register_android_content_StringBlock), REG_JNI(register_android_content_XmlBlock), diff --git a/core/jni/android_util_FloatMath.cpp b/core/jni/android_util_FloatMath.cpp deleted file mode 100644 index 73b7a6f..0000000 --- a/core/jni/android_util_FloatMath.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "jni.h" -#include <android_runtime/AndroidRuntime.h> -#include <math.h> -#include <float.h> -#include "SkTypes.h" - -class MathUtilsGlue { -public: - static float FloorF(JNIEnv* env, jobject clazz, float x) { - return floorf(x); - } - - static float CeilF(JNIEnv* env, jobject clazz, float x) { - return ceilf(x); - } - - static float SinF(JNIEnv* env, jobject clazz, float x) { - return sinf(x); - } - - static float CosF(JNIEnv* env, jobject clazz, float x) { - return cosf(x); - } - - static float SqrtF(JNIEnv* env, jobject clazz, float x) { - return sqrtf(x); - } - - static float ExpF(JNIEnv* env, jobject clazz, float x) { - return expf(x); - } - - static float PowF(JNIEnv* env, jobject clazz, float x, float y) { - return powf(x, y); - } - - static float HypotF(JNIEnv* env, jobject clazz, float x, float y) { - return hypotf(x, y); - } -}; - -static JNINativeMethod gMathUtilsMethods[] = { - {"floor", "(F)F", (void*) MathUtilsGlue::FloorF}, - {"ceil", "(F)F", (void*) MathUtilsGlue::CeilF}, - {"sin", "(F)F", (void*) MathUtilsGlue::SinF}, - {"cos", "(F)F", (void*) MathUtilsGlue::CosF}, - {"sqrt", "(F)F", (void*) MathUtilsGlue::SqrtF}, - {"exp", "(F)F", (void*) MathUtilsGlue::ExpF}, - {"pow", "(FF)F", (void*) MathUtilsGlue::PowF}, - {"hypot", "(FF)F", (void*) MathUtilsGlue::HypotF}, -}; - -int register_android_util_FloatMath(JNIEnv* env) -{ - int result = android::AndroidRuntime::registerNativeMethods(env, - "android/util/FloatMath", - gMathUtilsMethods, - SK_ARRAY_COUNT(gMathUtilsMethods)); - return result; -} - |