Change throbber (spinner) on tab strip to comply with material design
commit876f67c762ce45e8f2bc9741e61b2b344d511073
authorchangwan <changwan@chromium.org>
Mon, 1 Jun 2015 07:54:56 +0000 (1 00:54 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 1 Jun 2015 07:55:35 +0000 (1 07:55 +0000)
treed6324914c37418813792596906912783b51ef5b2
parentadf797a58dababb597451f6c0302e32d41188a5e
Change throbber (spinner) on tab strip to comply with material design

The previous model was to rotate a static image resource. We are replacing
it by a new model where the head revolves around the center while the tail
catches the head once in a while in an accelerated manner.

Instead of decoding throbber.svg file, we are calling paint_throbber.cc to
avoid file access. Caching was considered, but as you can see in
paint_throbber.cc, it would take quite a long time to get to the origin
because of its graphical nature, so caching would not be very efficient.

One visual caveat is that the current frame rate is limited to ~16 FPS
inside StripLayoutHelper, so the motion will stutter a bit when the user
is not taking any action. However, increasing FPS may have an adverse
effect on power consumption and performance, and some say it is hardly
noticeable, so I'll take care of it in a separate CL if many point it out.

BUG=489488

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

Cr-Commit-Position: refs/heads/master@{#332168}
13 files changed:
chrome/android/java_staging/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java
chrome/android/java_staging/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutTab.java
chrome/android/java_staging/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java
chrome/browser/android/compositor/decoration_title.cc
chrome/browser/android/compositor/decoration_title.h
chrome/browser/android/compositor/layer/tab_handle_layer.cc
chrome/browser/android/compositor/layer/tab_handle_layer.h
chrome/browser/android/compositor/layer/throbber_layer.cc [new file with mode: 0644]
chrome/browser/android/compositor/layer/throbber_layer.h [new file with mode: 0644]
chrome/browser/android/compositor/layer_title_cache.cc
chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.cc
chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.h
chrome/chrome_browser.gypi