Defer preferred size updates to after commit
https://crrev.com/581383 removed a preferred size timer and started synchronously updating preferred sizes in DidUpdateMainFrameLayout. This caused a performance regression because, even though layout is up-to-date, the preferred contents size may need to be re-computed. Script can cause many layouts per frame which was a performance regression because many multiple preferred contents size updates are now occurring per frame. This patch adds a bool for if a layout occurred which may have changed the preferred content size, and defers the update until after the commit. Bug: 872599 Change-Id: Idfe1ba523b1ecfdf8f959bafc2e20ef6a52487bb Reviewed-on: https://chromium-review.googlesource.com/1172059 Commit-Queue: Philip Rogers <pdr@chromium.org> Reviewed-by:vmpstr <vmpstr@chromium.org> Reviewed-by:
Bo <boliu@chromium.org> Reviewed-by:
Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/master@{#582708}
Showing
Please register or sign in to comment