Add missing ifdefs
Change-Id: I1c7c66cf81a31b56e6ae65d34b7936f9e8beec29
This commit is contained in:
@@ -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) \
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
#include "jni.h"
|
||||
|
||||
#ifdef USE_OPENGL_RENDERER
|
||||
|
||||
#include <Animator.h>
|
||||
|
||||
namespace android {
|
||||
@@ -34,3 +36,5 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user