Do not invoke DrawFadedString() if it knows it does not fade.
commit887eb46392320c209e507880f8268111c804d99a
authormukai <mukai@chromium.org>
Fri, 23 Jan 2015 22:02:03 +0000 (23 14:02 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 23 Jan 2015 22:03:44 +0000 (23 22:03 +0000)
tree606a2ac24b7ba6fd40aa45313e8af3662742ddfd
parent9d761c02fcf1f2a821e7c43d1fdb25f61eeadea1
Do not invoke DrawFadedString() if it knows it does not fade.

This is intentionally tiny and intended to be merged into M41.
views::Label already knows the size of the text (GetTextSize()
returns the cached size), therefore it knows the current text
does not fade at all.

Since this will avoid the check if the text may fade or not in
gfx::Canvas::DrawFadedString(), this can potentially make
the drawing 2x faster if the text doesn't fade at all.

BUG=451297
R=sky@chromium.org
TEST=on link_freon, with the bookmark sample in crbug.com/440551
  (contains ~15 bookmarks), repaint of bookmark bar is improved
  as: ~100msec -> ~55msec

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

Cr-Commit-Position: refs/heads/master@{#312942}
ui/views/controls/label.cc