Stop updating tab strips when they are completely hidden
commit36f73bd26f385e6c84f8bbbe3ab77a8a62f71d1e
authorchangwan <changwan@chromium.org>
Mon, 27 Jul 2015 18:20:43 +0000 (27 11:20 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 27 Jul 2015 18:21:15 +0000 (27 18:21 +0000)
tree4eb0bc523cd67a09037962994b815b21f0e73d78
parent9a96f5669527b27827ad43edb8a912ef7c2d5b6d
Stop updating tab strips when they are completely hidden

We've been updating tab strips even when they are not shown at all.
It includes relatively expensive operations such as image rotation,
and if we adopt material spinner it will cost 2 skia operations
(SkPath::arcTo and SkCanvas::drawPath). Note that this cost is per tab.

Hopefully, this can improve power and performance, especially when
tab is loading but tab strip is hidden.

BUG=489488

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

Cr-Commit-Position: refs/heads/master@{#340504}
chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java
chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.cc
chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.h