Migrate YGNodeStyleGetFlex method to vanilla jni (YogaStyleProperties Part 2)

Summary: Move Yoga style properties to vanilla JNI under a flag.

Reviewed By: amir-shalem

Differential Revision: D17666090

fbshipit-source-id: 121b939c310799c79f2fce0ea293f88b2940c4fc
This commit is contained in:
Sidharth Guglani
2019-10-08 14:23:57 -07:00
committed by Facebook Github Bot
parent 32a973ebd1
commit 3fce27c48c
3 changed files with 6 additions and 12 deletions

View File

@@ -134,7 +134,8 @@ public class YogaNative {
static native void jni_YGNodeStyleSetOverflowJNI(long nativePointer, int overflow);
static native int jni_YGNodeStyleGetDisplayJNI(long nativePointer);
static native void jni_YGNodeStyleSetDisplayJNI(long nativePointer, int display);
public static native void jni_YGNodeStyleSetFlexJNI(long nativePointer, float flex);
static native float jni_YGNodeStyleGetFlexJNI(long nativePointer);
static native void jni_YGNodeStyleSetFlexJNI(long nativePointer, float flex);
static native float jni_YGNodeStyleGetFlexGrowJNI(long nativePointer);
static native void jni_YGNodeStyleSetFlexGrowJNI(long nativePointer, float flexGrow);
static native float jni_YGNodeStyleGetFlexShrinkJNI(long nativePointer);

View File

@@ -313,7 +313,7 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
}
public float getFlex() {
return YogaNative.jni_YGNodeStyleGetFlex(mNativePointer);
return useVanillaJNI ? YogaNative.jni_YGNodeStyleGetFlexJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetFlex(mNativePointer);
}
public void setFlex(float flex) {