diff options
author | simonhong@chromium.org <simonhong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-27 05:16:36 +0000 |
---|---|---|
committer | simonhong@chromium.org <simonhong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-27 05:16:36 +0000 |
commit | cd77bb637084527e89dbdaace8e18c9ea2447984 (patch) | |
tree | 36305302bf1f383f8c01469f5dcd44dc70347ee1 /cc | |
parent | 83bb676b9de7905e26f1f809152427f3fbc65567 (diff) | |
download | chromium_src-cd77bb637084527e89dbdaace8e18c9ea2447984.zip chromium_src-cd77bb637084527e89dbdaace8e18c9ea2447984.tar.gz chromium_src-cd77bb637084527e89dbdaace8e18c9ea2447984.tar.bz2 |
cc: Use needs_animate_layers()
Use needs_animate_layers() instead of calling
animation_registrar_->active_animation_controllers().empty().
R=enne@chromium.org
BUG=NONE
TEST=NONE(trivial change)
Review URL: https://codereview.chromium.org/212213003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259785 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r-- | cc/trees/layer_tree_host_impl.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index 01acc7b..072e8e7 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -938,8 +938,7 @@ void LayerTreeHostImpl::UpdateBackgroundAnimateTicking( if (should_background_tick) DCHECK(active_tree_->root_layer()); - bool enabled = should_background_tick && - !animation_registrar_->active_animation_controllers().empty(); + bool enabled = should_background_tick && needs_animate_layers(); // Lazily create the time_source adapter so that we can vary the interval for // testing. @@ -2683,7 +2682,7 @@ void LayerTreeHostImpl::AnimateTopControls(base::TimeTicks time) { void LayerTreeHostImpl::AnimateLayers(base::TimeTicks monotonic_time) { if (!settings_.accelerated_animation_enabled || - animation_registrar_->active_animation_controllers().empty() || + !needs_animate_layers() || !active_tree_->root_layer()) return; @@ -2705,7 +2704,7 @@ void LayerTreeHostImpl::AnimateLayers(base::TimeTicks monotonic_time) { void LayerTreeHostImpl::UpdateAnimationState(bool start_ready_animations) { if (!settings_.accelerated_animation_enabled || - animation_registrar_->active_animation_controllers().empty() || + !needs_animate_layers() || !active_tree_->root_layer()) return; |