Fixes flickering in chrome://settings/startup with the scheduler enabled
commite6cdee7f596a3a897a2786e58a88b0f69cd31a9f
authoralexclarke <alexclarke@chromium.org>
Thu, 22 Jan 2015 23:05:02 +0000 (22 15:05 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 22 Jan 2015 23:06:04 +0000 (22 23:06 +0000)
treea61960cdf17018e1aae632f3fc85b138219a3613
parente61989b21484b652a5124d4cfad960dbd8b6946c
Fixes flickering in chrome://settings/startup with the scheduler enabled

Previously CustomHomePagesTableModel::SetToCurrentlyOpenPages was
sending a large number of StartupOverlay.updateStartupPages with
intermediate state as pre-existing rows where removed and then new ones
added and their titles looked up.  This became a problem with the blink
scheduler enabled on touch devices, because a touch puts the renderer
scheduler into compositor priority and generated more frames than before
leading to horrible flickering of the dialog.

This patch fixes that by only sending a single update once all of the
titles have been looked up.

BUG=450953

Review URL: https://codereview.chromium.org/870563003

Cr-Commit-Position: refs/heads/master@{#312695}
chrome/browser/custom_home_pages_table_model.cc
chrome/browser/custom_home_pages_table_model.h