mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
added flag for useBatchingForLayoutOutputs experiment
Summary: Using a config flag to switch between different implementations of transferring layout outputs - YogaNodeJNI uses multiple access of java fields to pass all properties like width, height, margin etc... - YogaNodeJNIBatching uses a float array to pass all the data in one java field access Reviewed By: davidaurelio Differential Revision: D14378301 fbshipit-source-id: 0da5b28e6a67ad8fd60eb7efe622d9b2deaf177f
This commit is contained in:
1 parent
9bbca7c531
commit
11e93cdc1f
5 files changed
+17
-9
No files matched your search
@@ -10,11 +10,11 @@ import javax.annotation.Nullable;
|
||||
|
||||
public abstract class YogaNode {
|
||||
public static YogaNode create() {
|
||||
return new YogaNodeJNI();
|
||||
return YogaConfig.useBatchingForLayoutOutputs ? new YogaNodeJNIBatching() : new YogaNodeJNI();
|
||||
}
|
||||
|
||||
public static YogaNode create(YogaConfig config) {
|
||||
return new YogaNodeJNI(config);
|
||||
return YogaConfig.useBatchingForLayoutOutputs ? new YogaNodeJNIBatching(config) : new YogaNodeJNI(config);
|
||||
}
|
||||
|
||||
public abstract void reset();
|
||||
|
||||
Reference in new issue
Block a user