BREAKING - Change measure() api to remove need for MeasureOutput allocation
Summary: This is an API breaking change done to allow us to avoid an allocation during measurement. Instead we do the same trick as is done when passing measure results to C, we path them into a long. Reviewed By: splhack Differential Revision: D4081037 fbshipit-source-id: 28adbcdd160cbd3f59a0fdd4b9f1200ae18678f1
This commit is contained in:
committed by
Facebook Github Bot
parent
c34299edc9
commit
b59ce09109
@@ -543,9 +543,8 @@ namespace Facebook.CSSLayout
|
||||
throw new InvalidOperationException("Measure function is not defined.");
|
||||
}
|
||||
|
||||
_measureFunction(this, width, widthMode, height, heightMode, _measureOutput);
|
||||
|
||||
return new CSSSize { width = _measureOutput.Width, height = _measureOutput.Height };
|
||||
long output = _measureFunction(this, width, widthMode, height, heightMode);
|
||||
return new CSSSize { width = MeasureOutput.GetWidth(output), height = MeasureOutput.GetHeight(output) };
|
||||
}
|
||||
|
||||
public string Print(CSSPrintOptions options =
|
||||
|
Reference in New Issue
Block a user