• Philip Rogers's avatar
    Defer preferred size updates to after commit · 33cd2bcc
    Philip Rogers authored
    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: default avatarvmpstr <vmpstr@chromium.org>
    Reviewed-by: default avatarBo <boliu@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#582708}
    33cd2bcc
aw_render_view_ext.h 1.35 KB