Commit c1ee9705 authored by erikchen@chromium.org's avatar erikchen@chromium.org

Mac: Don't perform unnecessary star decoration redraws.

If the star in the Location Bar is already in the correct state, then there's
no need to perform a complete redraw.

This was responsible for ~50% of extraneous location bar redraws, which was
consuming ~5% of cpu cycles on start up.

BUG=393819

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287902 0039d316-1c4b-4281-b951-d872f2087c98
parent 6be6fa9a
...@@ -339,6 +339,9 @@ bool LocationBarViewMac::IsEditable() { ...@@ -339,6 +339,9 @@ bool LocationBarViewMac::IsEditable() {
} }
void LocationBarViewMac::SetStarred(bool starred) { void LocationBarViewMac::SetStarred(bool starred) {
if (star_decoration_->starred() == starred)
return;
star_decoration_->SetStarred(starred); star_decoration_->SetStarred(starred);
UpdateStarDecorationVisibility(); UpdateStarDecorationVisibility();
OnDecorationsChanged(); OnDecorationsChanged();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment