Index: cc/trees/layer_tree_host_impl.cc |
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
index e13da9acd87222a76f6637c69ab945e3c1d40952..2f11adcfc4d74332408b93e5fb0cff6627c7b494 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -3121,31 +3121,26 @@ void LayerTreeHostImpl::AnimateLayers(base::TimeTicks monotonic_time) { |
return; |
TRACE_EVENT0("cc", "LayerTreeHostImpl::AnimateLayers"); |
- AnimationRegistrar::AnimationControllerMap copy = |
+ AnimationRegistrar::AnimationControllerMap controllers_copy = |
animation_registrar_->active_animation_controllers(); |
- for (AnimationRegistrar::AnimationControllerMap::iterator iter = copy.begin(); |
- iter != copy.end(); |
- ++iter) |
- (*iter).second->Animate(monotonic_time); |
+ for (auto& it : controllers_copy) |
+ it.second->Animate(monotonic_time); |
SetNeedsAnimate(); |
} |
void LayerTreeHostImpl::UpdateAnimationState(bool start_ready_animations) { |
- if (!settings_.accelerated_animation_enabled || |
- !needs_animate_layers() || |
+ if (!settings_.accelerated_animation_enabled || !needs_animate_layers() || |
!active_tree_->root_layer()) |
return; |
TRACE_EVENT0("cc", "LayerTreeHostImpl::UpdateAnimationState"); |
scoped_ptr<AnimationEventsVector> events = |
make_scoped_ptr(new AnimationEventsVector); |
- AnimationRegistrar::AnimationControllerMap copy = |
+ AnimationRegistrar::AnimationControllerMap active_controllers_copy = |
animation_registrar_->active_animation_controllers(); |
- for (AnimationRegistrar::AnimationControllerMap::iterator iter = copy.begin(); |
- iter != copy.end(); |
- ++iter) |
- (*iter).second->UpdateState(start_ready_animations, events.get()); |
+ for (auto& it : active_controllers_copy) |
+ it.second->UpdateState(start_ready_animations, events.get()); |
if (!events->empty()) { |
client_->PostAnimationEventsToMainThreadOnImplThread(events.Pass()); |
@@ -3160,12 +3155,10 @@ void LayerTreeHostImpl::ActivateAnimations() { |
return; |
TRACE_EVENT0("cc", "LayerTreeHostImpl::ActivateAnimations"); |
- AnimationRegistrar::AnimationControllerMap copy = |
+ AnimationRegistrar::AnimationControllerMap active_controllers_copy = |
animation_registrar_->active_animation_controllers(); |
- for (AnimationRegistrar::AnimationControllerMap::iterator iter = copy.begin(); |
- iter != copy.end(); |
- ++iter) |
- (*iter).second->ActivateAnimations(); |
+ for (auto& it : active_controllers_copy) |
+ it.second->ActivateAnimations(); |
SetNeedsAnimate(); |
} |