diff options
Diffstat (limited to 'core/jni/android/graphics/Rasterizer.cpp')
-rw-r--r-- | core/jni/android/graphics/Rasterizer.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/core/jni/android/graphics/Rasterizer.cpp b/core/jni/android/graphics/Rasterizer.cpp index 2b1aca1..cfc23ac8 100644 --- a/core/jni/android/graphics/Rasterizer.cpp +++ b/core/jni/android/graphics/Rasterizer.cpp @@ -24,7 +24,7 @@ #include "GraphicsJNI.h" #include "Paint.h" #include "SkLayerRasterizer.h" -#include <android_runtime/AndroidRuntime.h> +#include "core_jni_helpers.h" // Rasterizer.java holds a pointer (jlong) to this guy class NativeRasterizer { @@ -59,7 +59,6 @@ public: static void finalizer(JNIEnv* env, jobject clazz, jlong objHandle) { delete reinterpret_cast<NativeRasterizer *>(objHandle); } - }; static JNINativeMethod gRasterizerMethods[] = { @@ -67,9 +66,8 @@ static JNINativeMethod gRasterizerMethods[] = { }; int register_android_graphics_Rasterizer(JNIEnv* env) { - int result = AndroidRuntime::registerNativeMethods(env, "android/graphics/Rasterizer", gRasterizerMethods, - sizeof(gRasterizerMethods) / sizeof(gRasterizerMethods[0])); - return result; + return RegisterMethodsOrDie(env, "android/graphics/Rasterizer", gRasterizerMethods, + NELEM(gRasterizerMethods)); } class SkLayerRasterizerGlue { @@ -94,10 +92,8 @@ static JNINativeMethod gLayerRasterizerMethods[] = { int register_android_graphics_LayerRasterizer(JNIEnv* env) { - return android::AndroidRuntime::registerNativeMethods(env, - "android/graphics/LayerRasterizer", - gLayerRasterizerMethods, - SK_ARRAY_COUNT(gLayerRasterizerMethods)); + return RegisterMethodsOrDie(env, "android/graphics/LayerRasterizer", + gLayerRasterizerMethods, NELEM(gLayerRasterizerMethods)); } } |