Skip to content

Commit

Permalink
Implement double measure experiment
Browse files Browse the repository at this point in the history
Reviewed By: SidharthGuglani

Differential Revision: D16340462

fbshipit-source-id: b157d8137c72f83a3bea46f30d0f46f65055f9ef
  • Loading branch information
davidaurelio authored and facebook-github-bot committed Jul 19, 2019
1 parent fd3b568 commit 97378ef
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/yoga/src/main/cpp/yoga/Yoga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "YGNodePrint.h"
#include "Yoga-internal.h"
#include "event/event.h"
#include "internal/experiments-inl.h"
#ifdef _MSC_VER
#include <float.h>

Expand Down Expand Up @@ -1656,6 +1657,15 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(
measuredSize.height,
reason});

if (internal::isEnabled(internal::Experiment::kDoubleMeasureCallbacks)) {
node->measure(
innerWidth,
widthMeasureMode,
innerHeight,
heightMeasureMode,
layoutContext);
}

node->setLayoutMeasuredDimension(
YGNodeBoundAxis(
node,
Expand Down

0 comments on commit 97378ef

Please sign in to comment.