Added counts for measure callbacks reasons in an array inside qpl annotations

Summary:
Added an array to maintain the counts of each of the reason of measure callbacks
and this is now added as qpl metadata in Layout Calculation qpl event

Reviewed By: davidaurelio

Differential Revision: D16516379

fbshipit-source-id: 201c5d2463f0a921841a0bbfec8f4d5e007000c8
This commit is contained in:
Sidharth Guglani
2019-07-31 14:33:36 -07:00
committed by Facebook Github Bot
parent 825da1e868
commit 095c991b85
2 changed files with 21 additions and 10 deletions

View File

@@ -1645,6 +1645,13 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(
layoutContext);
layoutMarkerData.measureCallbacks += 1;
if (reason == LayoutPassReason::kMeasureChild) {
layoutMarkerData.measureChildMeasureCallbacks += 1;
} else if (reason == LayoutPassReason::kFlexMeasure) {
layoutMarkerData.flexMeasureMeasureCallbacks += 1;
} else if (reason == LayoutPassReason::kAbsMeasureChild) {
layoutMarkerData.absMeasureChildMeasureCallbacks += 1;
}
Event::publish<Event::MeasureCallbackEnd>(
node,