BREAKING - Change measure() api to remove need for MeasureOutput allocation

Reviewed By: splhack

Differential Revision: D4081037

fbshipit-source-id: 28adbcdd160cbd3f59a0fdd4b9f1200ae18678f1
This commit is contained in:
Emil Sjolander
2016-10-27 10:52:09 -07:00
committed by Facebook Github Bot
parent bafc6ddbd1
commit 553f4371e0
11 changed files with 55 additions and 50 deletions

View File

@@ -487,15 +487,12 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
throw new RuntimeException("Measure function isn't defined!");
}
MeasureOutput output = new MeasureOutput();
mMeasureFunction.measure(
return mMeasureFunction.measure(
this,
width,
CSSMeasureMode.values()[widthMode],
height,
CSSMeasureMode.values()[heightMode],
output);
return ((long) output.width) << 32 | ((long) output.height);
CSSMeasureMode.values()[heightMode]);
}
@Override