Move event NodeLayout to end of NodeLayout step

Summary:
Added event NodeLayoutEnd and this is being used now instead of NodeLayout
It will be used later to add more information about caches

Reviewed By: davidaurelio

Differential Revision: D15920935

fbshipit-source-id: c9f5e193bc8cc70d26ff5d84882d483c9b09f67d
This commit is contained in:
Sidharth Guglani
2019-06-24 08:29:59 -07:00
committed by Facebook Github Bot
parent d667ebd66e
commit 2dc5a16d1f
2 changed files with 12 additions and 4 deletions

View File

@@ -3693,9 +3693,6 @@ bool YGLayoutNodeInternal(
const YGConfigRef config,
YGMarkerLayoutData& layoutMarkerData,
void* const layoutContext) {
#ifdef YG_ENABLE_EVENTS
Event::publish<Event::NodeLayout>(node, {performLayout, layoutContext});
#endif
YGLayout* layout = &node->getLayout();
gDepth++;
@@ -3929,6 +3926,11 @@ bool YGLayoutNodeInternal(
gDepth--;
layout->generationCount = gCurrentGenerationCount;
#ifdef YG_ENABLE_EVENTS
Event::publish<Event::NodeLayout>(node, {performLayout, layoutContext});
#endif
return (needToVisitNode || cachedResults == nullptr);
}