Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Issue 870903002: Do not invoke DrawFadedString() if it knows it does not fade. (Closed)

Created:
5 years, 11 months ago by Jun Mukai
Modified:
5 years, 11 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/887eb46392320c209e507880f8268111c804d99a Cr-Commit-Position: refs/heads/master@{#312942}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M ui/views/controls/label.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 8 (1 generated)
Jun Mukai
5 years, 11 months ago (2015-01-23 17:37:16 UTC) #1
sky
Why can't we do this check in canvas?
5 years, 11 months ago (2015-01-23 17:55:59 UTC) #2
Jun Mukai
On 2015/01/23 17:55:59, sky wrote: > Why can't we do this check in canvas? The ...
5 years, 11 months ago (2015-01-23 18:16:10 UTC) #3
sky
Ok, makes sense, LGTM
5 years, 11 months ago (2015-01-23 20:22:33 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/870903002/1
5 years, 11 months ago (2015-01-23 20:32:17 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 11 months ago (2015-01-23 22:02:34 UTC) #7
commit-bot: I haz the power
5 years, 11 months ago (2015-01-23 22:04:15 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/887eb46392320c209e507880f8268111c804d99a
Cr-Commit-Position: refs/heads/master@{#312942}

Powered by Google App Engine
This is Rietveld 408576698