Move execution of Yoga.calculateLayout method before diffing algorithm
Reviewed By: shergin Differential Revision: D7495581 fbshipit-source-id: 63d2f2a66c53727dea7981837d6d0f896bac35d3
This commit is contained in:
parent
e21bbee586
commit
84ae1c9aec
|
@ -256,20 +256,12 @@ public class FabricUIManager implements UIManager {
|
|||
currentRootShadowNode,
|
||||
"Root view with tag " + rootTag + " must be added before completeRoot is called");
|
||||
|
||||
|
||||
currentRootShadowNode = calculateDiffingAndCreateNewRootNode(currentRootShadowNode, childList);
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "ReactShadowNodeHierarchy after diffing: " + currentRootShadowNode.getHierarchyInfo());
|
||||
}
|
||||
|
||||
notifyOnBeforeLayoutRecursive(currentRootShadowNode);
|
||||
currentRootShadowNode.calculateLayout();
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"ReactShadowNodeHierarchy after calculate Layout: " + currentRootShadowNode.getHierarchyInfo());
|
||||
"ReactShadowNodeHierarchy after diffing: " + currentRootShadowNode.getHierarchyInfo());
|
||||
}
|
||||
|
||||
applyUpdatesRecursive(currentRootShadowNode, 0, 0);
|
||||
|
@ -299,6 +291,21 @@ public class FabricUIManager implements UIManager {
|
|||
appendChild(newRootShadowNode, child);
|
||||
}
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"ReactShadowNodeHierarchy before calculateLayout: " + newRootShadowNode.getHierarchyInfo());
|
||||
}
|
||||
|
||||
notifyOnBeforeLayoutRecursive(newRootShadowNode);
|
||||
newRootShadowNode.calculateLayout();
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"ReactShadowNodeHierarchy after calculateLayout: " + newRootShadowNode.getHierarchyInfo());
|
||||
}
|
||||
|
||||
mFabricReconciler.manageChildren(currentRootShadowNode, newRootShadowNode);
|
||||
return newRootShadowNode;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue