Check if width is different before skipping Layout().

Change-Id: Ie5a99f39cf462c42ed1e484afc90a61e7567bdc3
This commit is contained in:
Gary Qian
2017-07-27 17:54:27 -07:00
parent 95bda714a0
commit d09bbdfd37

View File

@@ -167,7 +167,7 @@ void Paragraph::FillWhitespaceSet(size_t start,
void Paragraph::Layout(double width, bool force) {
// Do not allow calling layout multiple times without changing anything.
if (!needs_layout_ && !force)
if (!needs_layout_ && !force && width == width_)
return;
needs_layout_ = false;