cc: Use needs_animate_layers()
Use needs_animate_layers() instead of calling
animation_registrar_->active_animation_controllers().empty().
[email protected]
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
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 @@
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::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::UpdateAnimationState(bool start_ready_animations) {
if (!settings_.accelerated_animation_enabled ||
- animation_registrar_->active_animation_controllers().empty() ||
+ !needs_animate_layers() ||
!active_tree_->root_layer())
return;