Add missing ifdefs

Change-Id: I1c7c66cf81a31b56e6ae65d34b7936f9e8beec29
This commit is contained in:
John Reck
2014-04-30 16:59:40 -07:00
parent 406c51b360
commit 496b8770c1
2 changed files with 10 additions and 0 deletions

View File

@@ -37,6 +37,8 @@ static struct {
jmethodID callOnFinished;
} gRenderNodeAnimatorClassInfo;
#ifdef USE_OPENGL_RENDERER
static JNIEnv* getEnv(JavaVM* vm) {
JNIEnv* env;
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
@@ -93,6 +95,8 @@ static void unref(JNIEnv* env, jobject clazz, jlong objPtr) {
obj->decStrong(0);
}
#endif
// ----------------------------------------------------------------------------
// JNI Glue
// ----------------------------------------------------------------------------
@@ -100,9 +104,11 @@ static void unref(JNIEnv* env, jobject clazz, jlong objPtr) {
const char* const kClassPathName = "android/view/RenderNodeAnimator";
static JNINativeMethod gMethods[] = {
#ifdef USE_OPENGL_RENDERER
{ "nCreateAnimator", "(Ljava/lang/ref/WeakReference;IIF)J", (void*) createAnimator },
{ "nSetDuration", "(JI)V", (void*) setDuration },
{ "nUnref", "(J)V", (void*) unref },
#endif
};
#define FIND_CLASS(var, className) \

View File

@@ -16,6 +16,8 @@
#include "jni.h"
#ifdef USE_OPENGL_RENDERER
#include <Animator.h>
namespace android {
@@ -34,3 +36,5 @@ private:
};
}
#endif