Remove legacy layout diffing
Summary: This removes some unused flags which will cause Yoga to layout every tree twice, then diffing the tree, reporting whether the whole tree is different. This is too expensive to run outside of local experimentation, but we have more nuanced ways to implement the `YGNodeLayoutAffectedByQuirk` I am wanting to add. Changelog: [Internal] Reviewed By: lunaleaps Differential Revision: D42406917 fbshipit-source-id: b415ed02768f6b59de3a6fa90c60c750d56fd4b0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cac197f5a6
commit
9e1bcd8557
@@ -17,7 +17,6 @@ const short int LAYOUT_BORDER_START_INDEX = 14;
|
||||
|
||||
namespace {
|
||||
|
||||
const int DOES_LEGACY_STRETCH_BEHAVIOUR = 8;
|
||||
const int HAS_NEW_LAYOUT = 16;
|
||||
|
||||
union YGNodeContext {
|
||||
|
@@ -57,15 +57,6 @@ static void jni_YGConfigSetExperimentalFeatureEnabledJNI(
|
||||
config, static_cast<YGExperimentalFeature>(feature), enabled);
|
||||
}
|
||||
|
||||
static void jni_YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviourJNI(
|
||||
JNIEnv* env,
|
||||
jobject obj,
|
||||
jlong nativePointer,
|
||||
jboolean enabled) {
|
||||
const YGConfigRef config = _jlong2YGConfigRef(nativePointer);
|
||||
YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(config, enabled);
|
||||
}
|
||||
|
||||
static void jni_YGConfigSetUseWebDefaultsJNI(
|
||||
JNIEnv* env,
|
||||
jobject obj,
|
||||
@@ -294,9 +285,6 @@ static void YGTransferLayoutOutputsRecursive(
|
||||
|
||||
int fieldFlags = edgesSet.get();
|
||||
fieldFlags |= HAS_NEW_LAYOUT;
|
||||
if (YGNodeLayoutGetDidLegacyStretchFlagAffectLayout(root)) {
|
||||
fieldFlags |= DOES_LEGACY_STRETCH_BEHAVIOUR;
|
||||
}
|
||||
|
||||
const int arrSize = 6 + (marginFieldSet ? 4 : 0) + (paddingFieldSet ? 4 : 0) +
|
||||
(borderFieldSet ? 4 : 0);
|
||||
@@ -776,9 +764,6 @@ static JNINativeMethod methods[] = {
|
||||
{"jni_YGConfigSetUseLegacyStretchBehaviourJNI",
|
||||
"(JZ)V",
|
||||
(void*) jni_YGConfigSetUseLegacyStretchBehaviourJNI},
|
||||
{"jni_YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviourJNI",
|
||||
"(JZ)V",
|
||||
(void*) jni_YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviourJNI},
|
||||
{"jni_YGConfigSetLoggerJNI",
|
||||
"(JLcom/facebook/yoga/YogaLogger;)V",
|
||||
(void*) jni_YGConfigSetLoggerJNI},
|
||||
|
Reference in New Issue
Block a user