move yg node new and ygnode new with config

Summary: YGNode creation methods to vanilla JNI

Reviewed By: amir-shalem

Differential Revision: D17714230

fbshipit-source-id: 74e14e876ab7efc67771d92091c2a78f09072b83
This commit is contained in:
Sidharth Guglani authored and Facebook Github Bot committed 2019-10-08 17:52:04 -07:00
1 parent 952076e2bf
commit b0b1666402
5 files changed
+47 -1

No files matched your search

@@ -59,8 +59,12 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
this(YogaNative.jni_YGNodeNew());
}
YogaNodeJNIBase(boolean useVanillaJNI) {
this(useVanillaJNI ? YogaNative.jni_YGNodeNewJNI() : YogaNative.jni_YGNodeNew());
}
YogaNodeJNIBase(YogaConfig config) {
this(YogaNative.jni_YGNodeNewWithConfig(((YogaConfigJNIBase)config).mNativePointer));
this(config.useVanillaJNI() ? YogaNative.jni_YGNodeNewWithConfigJNI(((YogaConfigJNIBase)config).mNativePointer) : YogaNative.jni_YGNodeNewWithConfig(((YogaConfigJNIBase)config).mNativePointer));
this.useVanillaJNI = config.useVanillaJNI();
}