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

Issue 60683003: A number of paint optimizations to improve overall paint times. (Closed)

Created:
7 years, 1 month ago by sky
Modified:
7 years, 1 month ago
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, tfarina, penghuang+watch_chromium.org, nona+watch_chromium.org, ben+views_chromium.org, James Su
Visibility:
Public.

Description

A number of paint optimizations to improve overall paint times. Here's the run down: . Removes unnecessary SchedulePaint() in DesktopRootWindowHostWin::SetOpacity. SchedulePaint isn't necessary here as opacity is handled by the layer. . Textfield::SetHorizontal/VerticalMargins should only invoke PreferredSizeChanged() if margins actually changed. Otherwise we invalidated all the way up the view hierarchy. This means the next call to Layout() at the root is going to layout and repaint everything. . Adds ImageView::SetImageByResourceID. Adding this allows us to do nothing if the image has changed. . StatusBubbleView was unnecessarily calling SchedulePaint in some situtations. In particular it should only SchedulePaint() if the text actually changes. . Changes a number of places in LocationBar to only SchedulePaint() if something actually changed. These methods can all be invoked rather frequently. BUG=313494 TEST=none R=ben@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=234692

Patch Set 1 #

Patch Set 2 : remove unnecessary includes #

Patch Set 3 : remove SetImageByResourceID and use BackedBySameObjectAs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -36 lines) Patch
M chrome/browser/ui/views/location_bar/location_bar_view.h View 1 2 2 chunks +13 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 9 chunks +44 lines, -23 lines 0 comments Download
M chrome/browser/ui/views/status_bubble_views.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M ui/views/controls/image_view.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_root_window_host_win.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
sky
7 years, 1 month ago (2013-11-12 15:56:10 UTC) #1
sky
Updated to remove SetImageByResourceID and have SetImage early out if images backed by same object.
7 years, 1 month ago (2013-11-12 20:25:44 UTC) #2
Ben Goodger (Google)
Cool, this seems more robust against future regression. LGTM
7 years, 1 month ago (2013-11-12 20:36:16 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/60683003/60001
7 years, 1 month ago (2013-11-12 20:51:48 UTC) #4
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 1 month ago (2013-11-12 21:11:06 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/60683003/60001
7 years, 1 month ago (2013-11-12 21:16:58 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sky@chromium.org/60683003/60001
7 years, 1 month ago (2013-11-12 23:35:11 UTC) #7
commit-bot: I haz the power
7 years, 1 month ago (2013-11-13 01:10:27 UTC) #8
Message was sent while issue was closed.
Change committed as 234692

Powered by Google App Engine
This is Rietveld 408576698