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

Issue 1393193002: Paint tab-loading throbbers into a ui::Layer. (Closed)

Created:
5 years, 2 months ago by tapted
Modified:
5 years ago
Reviewers:
danakj, Peter Kasting, sky
CC:
chromium-reviews, tfarina, miu+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Paint tab-loading throbbers into a ui::Layer. In views browsers, updating the tab loading throbber currently requires a repaint that starts at the BrowserView and trickles the damage rectangle down until it reaches the favicon area. This uses a lot of CPU and energy: about 11 watts above idle on a MacBook Pro (and significant CPU on Linux) for a single "waiting" spinner. Giving the throbber a layer allows the repaint to be isolated, with compositing done on the GPU. This brings total energy usage down to about 2.5 watts above idle. Plots at http://crbug.com/391646#c44 BUG=391646 TEST=Spinners should look and behave the same, but use less energy/CPU. Committed: https://crrev.com/23f218dbb7d9f4fd2401e71bfa5f23af32d13800 Cr-Commit-Position: refs/heads/master@{#355514}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Handle stacking/dragging, respond to comments #

Patch Set 3 : Neater logic, nits, fix bug in Tab::SetData #

Patch Set 4 : Fix tooltips #

Patch Set 5 : cl format #

Total comments: 15

Patch Set 6 : Also need to reset now that we hide (tab_strip.cc delta from rebase) #

Patch Set 7 : pkasting comments #

Patch Set 8 : de-inline #

Total comments: 4

Patch Set 9 : overrides -> private #

Total comments: 2

Patch Set 10 : rebase for crash animation update #

Patch Set 11 : Fix clipping on the right, and animations #

Total comments: 1

Patch Set 12 : V1: Switch to unlayered on-the-fly #

Patch Set 13 : simpler: TabController::CanPaintThrobberToLayer. Also: a test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+224 lines, -66 lines) Patch
M chrome/browser/ui/views/tabs/tab.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +5 lines, -15 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +114 lines, -41 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_strip.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_strip.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +92 lines, -10 lines 0 comments Download

Messages

Total messages: 39 (10 generated)
tapted
Hi sky - WDYT?
5 years, 2 months ago (2015-10-08 11:17:13 UTC) #2
danakj
Thanks for doing this! LGTM w/ a couple comments. https://codereview.chromium.org/1393193002/diff/1/chrome/browser/ui/views/tabs/tab.cc File chrome/browser/ui/views/tabs/tab.cc (right): https://codereview.chromium.org/1393193002/diff/1/chrome/browser/ui/views/tabs/tab.cc#newcode144 chrome/browser/ui/views/tabs/tab.cc:144: ...
5 years, 2 months ago (2015-10-08 14:09:02 UTC) #4
sky
I supsect you'll get bleed through of the throbber with stacked tabs, as well as ...
5 years, 2 months ago (2015-10-08 15:52:23 UTC) #5
sky
I'll also admit I'm surprised that we need a layer here. Does this mean anything ...
5 years, 2 months ago (2015-10-08 15:53:07 UTC) #6
danakj
On Thu, Oct 8, 2015 at 11:53 AM, <sky@chromium.org> wrote: > I'll also admit I'm ...
5 years, 2 months ago (2015-10-08 15:56:17 UTC) #7
sky
It's pretty common in the ui to animate smaller things. In addition to the throbber ...
5 years, 2 months ago (2015-10-08 15:59:10 UTC) #8
danakj
On Thu, Oct 8, 2015 at 11:59 AM, Scott Violet <sky@chromium.org> wrote: > It's pretty ...
5 years, 2 months ago (2015-10-08 16:01:08 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1393193002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1393193002/80001
5 years, 2 months ago (2015-10-09 06:27:57 UTC) #11
tapted
There was some subtle stuff... (maybe needs tests, but it will have to wait until ...
5 years, 2 months ago (2015-10-09 06:39:02 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-09 07:09:51 UTC) #14
Peter Kasting
Drive-by since I'm in the middle of touching some of this code Should we be ...
5 years, 2 months ago (2015-10-09 08:03:24 UTC) #16
tapted
On 2015/10/09 08:03:24, Peter Kasting wrote: > Should we be updating ui/views/controls/throbber.* as well? It ...
5 years, 2 months ago (2015-10-09 11:00:31 UTC) #17
Peter Kasting
LGTM, but do still get sky's signoff. I leave the decision about what changes to ...
5 years, 2 months ago (2015-10-09 11:06:26 UTC) #18
tapted
Wow I thought I was up late.. Thanks Peter! On 2015/10/09 11:06:26, Peter Kasting wrote: ...
5 years, 2 months ago (2015-10-09 11:37:26 UTC) #19
Peter Kasting
On 2015/10/09 11:37:26, tapted wrote: > Wow I thought I was up late.. Thanks Peter! ...
5 years, 2 months ago (2015-10-09 12:00:04 UTC) #20
sky
https://codereview.chromium.org/1393193002/diff/150005/chrome/browser/ui/views/tabs/tab.cc File chrome/browser/ui/views/tabs/tab.cc (right): https://codereview.chromium.org/1393193002/diff/150005/chrome/browser/ui/views/tabs/tab.cc#newcode1472 chrome/browser/ui/views/tabs/tab.cc:1472: clip.x() == 0 && clip.Contains(favicon_bounds_); I don't think this ...
5 years, 2 months ago (2015-10-09 15:16:38 UTC) #21
tapted
https://codereview.chromium.org/1393193002/diff/150005/chrome/browser/ui/views/tabs/tab.cc File chrome/browser/ui/views/tabs/tab.cc (right): https://codereview.chromium.org/1393193002/diff/150005/chrome/browser/ui/views/tabs/tab.cc#newcode1472 chrome/browser/ui/views/tabs/tab.cc:1472: clip.x() == 0 && clip.Contains(favicon_bounds_); On 2015/10/09 15:16:38, sky ...
5 years, 2 months ago (2015-10-11 10:36:38 UTC) #23
sky
Now you've favored not showing the throbber in many places when we should. How about ...
5 years, 2 months ago (2015-10-12 17:20:29 UTC) #24
tapted
PTAL. Sorry for the delay - wanted to ensure there was no jank introduced when ...
5 years, 2 months ago (2015-10-19 09:57:55 UTC) #26
sky
What happens if a throbber starts, then a drag starts? On Mon, Oct 19, 2015 ...
5 years, 2 months ago (2015-10-19 15:35:06 UTC) #27
tapted
On 2015/10/19 15:35:06, sky wrote: > What happens if a throbber starts, then a drag ...
5 years, 2 months ago (2015-10-19 23:00:32 UTC) #28
sky
LGTM Is there any noticable jank if lots of tabs are loading and you add ...
5 years, 2 months ago (2015-10-21 23:34:00 UTC) #29
tapted
On 2015/10/21 23:34:00, sky wrote: > LGTM > Is there any noticable jank if lots ...
5 years, 2 months ago (2015-10-22 08:01:36 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1393193002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1393193002/270001
5 years, 2 months ago (2015-10-22 08:03:43 UTC) #34
Peter Kasting
On 2015/10/22 08:01:36, tapted wrote: > On 2015/10/21 23:34:00, sky wrote: > > LGTM > ...
5 years, 2 months ago (2015-10-22 08:30:51 UTC) #35
commit-bot: I haz the power
Committed patchset #13 (id:270001)
5 years, 2 months ago (2015-10-22 08:45:14 UTC) #36
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/23f218dbb7d9f4fd2401e71bfa5f23af32d13800 Cr-Commit-Position: refs/heads/master@{#355514}
5 years, 2 months ago (2015-10-22 08:46:08 UTC) #37
jonross
A revert of this CL (patchset #13 id:270001) has been created in https://codereview.chromium.org/1415873006/ by jonross@chromium.org. ...
5 years, 2 months ago (2015-10-22 16:02:16 UTC) #38
tapted
5 years ago (2015-11-27 03:23:22 UTC) #39
Message was sent while issue was closed.
On 2015/10/22 16:02:16, jonross wrote:
> A revert of this CL (patchset #13 id:270001) has been created in
> https://codereview.chromium.org/1415873006/ by mailto:jonross@chromium.org.
> 
> The reason for reverting is: This is suspected of causing test failures on the
> Chrome OS trunk build. See crbug.com/546600
> 
> Reverting to verify..

The flaky (and non-flaky asan-but-chromeos-only) failures should be resolved by
a fix I've got up in https://codereview.chromium.org/1474993003/ (tl;dr
wm::RecreateLayers() was leaving around some stale ui::Layer pointers).

This CL should be fine after that lands, but it's been a while, so I've made
https://codereview.chromium.org/1477713002/ to reland this CL - it's identical
except for a trivial rebase. Further comments welcome there, otherwise I'll just
send to OWNERS, once the fix has landed.

Powered by Google App Engine
This is Rietveld 408576698