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:
committed by
Facebook Github Bot
parent
1471be54e3
commit
f273e80c77
@@ -10,11 +10,11 @@ import javax.annotation.Nullable;
|
|||||||
|
|
||||||
public abstract class YogaNode {
|
public abstract class YogaNode {
|
||||||
public static YogaNode create() {
|
public static YogaNode create() {
|
||||||
return new YogaNodeJNIBase();
|
return new YogaNodeJNI();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static YogaNode create(YogaConfig config) {
|
public static YogaNode create(YogaConfig config) {
|
||||||
return new YogaNodeJNIBase(config);
|
return new YogaNodeJNI(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract void reset();
|
public abstract void reset();
|
||||||
|
21
java/com/facebook/yoga/YogaNodeJNI.java
Normal file
21
java/com/facebook/yoga/YogaNodeJNI.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -13,7 +13,7 @@ import java.util.List;
|
|||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
@DoNotStrip
|
@DoNotStrip
|
||||||
public class YogaNodeJNIBase extends YogaNode {
|
public abstract class YogaNodeJNIBase extends YogaNode {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
SoLoader.loadLibrary("yoga");
|
SoLoader.loadLibrary("yoga");
|
||||||
|
Reference in New Issue
Block a user