Implement standard interface for toggling experimental features
Summary: We want to start experimenting with changes to the library in a more controlled and easier to measure manner. This diff adds the basics of an experiment layer to csslayout. Reviewed By: gkassabli Differential Revision: D4174260 fbshipit-source-id: ad3667183810c02833fba9a1276f89286e848fcd
This commit is contained in:
committed by
Facebook Github Bot
parent
b99172d28b
commit
e6702e1168
@@ -40,6 +40,20 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
|
||||
jni_CSSLayoutSetLogger(logger);
|
||||
}
|
||||
|
||||
private static native void jni_CSSLayoutSetExperimentalFeatureEnabled(
|
||||
int feature,
|
||||
boolean enabled);
|
||||
public static void setExperimentalFeatureEnabled(
|
||||
CSSExperimentalFeature feature,
|
||||
boolean enabled) {
|
||||
jni_CSSLayoutSetExperimentalFeatureEnabled(feature.ordinal(), enabled);
|
||||
}
|
||||
|
||||
private static native boolean jni_CSSLayoutIsExperimentalFeatureEnabled(int feature);
|
||||
public static boolean isExperimentalFeatureEnabled(CSSExperimentalFeature feature) {
|
||||
return jni_CSSLayoutIsExperimentalFeatureEnabled(feature.ordinal());
|
||||
}
|
||||
|
||||
private CSSNode mParent;
|
||||
private List<CSSNode> mChildren;
|
||||
private MeasureFunction mMeasureFunction;
|
||||
|
Reference in New Issue
Block a user