created a new class YogaNodeJNI which extends YogaNodeJNIBase and using YogaNodeJNi for new object creation

Summary:
Added a child class of YogaNodeJNIBase which will be used to separate layout outputs transfer logic.
This change set is for adding experiment for layout outputs batching using a float array

Reviewed By: davidaurelio

Differential Revision: D14368098

fbshipit-source-id: e0f10fb61cd09ee47cf9ce41fb400f4cfb3dd795
This commit is contained in:
Sidharth Guglani
2019-03-20 08:54:27 -07:00
committed by Facebook Github Bot
parent 1471be54e3
commit f273e80c77
3 changed files with 24 additions and 3 deletions

View File

@@ -10,11 +10,11 @@ import javax.annotation.Nullable;
public abstract class YogaNode {
public static YogaNode create() {
return new YogaNodeJNIBase();
return new YogaNodeJNI();
}
public static YogaNode create(YogaConfig config) {
return new YogaNodeJNIBase(config);
return new YogaNodeJNI(config);
}
public abstract void reset();

View File

@@ -0,0 +1,21 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*/
package com.facebook.yoga;
import com.facebook.proguard.annotations.DoNotStrip;
@DoNotStrip
public class YogaNodeJNI extends YogaNodeJNIBase {
public YogaNodeJNI() {
super();
}
public YogaNodeJNI(YogaConfig config) {
super(config);
}
}

View File

@@ -13,7 +13,7 @@ import java.util.List;
import javax.annotation.Nullable;
@DoNotStrip
public class YogaNodeJNIBase extends YogaNode {
public abstract class YogaNodeJNIBase extends YogaNode {
static {
SoLoader.loadLibrary("yoga");