Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 948243003: cc: Misc animation refactoring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address danakj's comment. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_animation.cc
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index b8d0320047532aa76f872b24fb64b57ee2873c93..c1da07ea305cf28e1994b6389babfdc81255a818 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -195,8 +195,9 @@ class LayerTreeHostAnimationTestAnimationsGetDeleted
void AnimateLayers(LayerTreeHostImpl* host_impl,
base::TimeTicks monotonic_time) override {
- bool have_animations = !host_impl->animation_registrar()->
- active_animation_controllers().empty();
+ bool have_animations = !host_impl->animation_registrar()
+ ->active_animation_controllers()
+ .empty();
if (!started_animating_ && have_animations) {
started_animating_ = true;
return;
@@ -1241,21 +1242,18 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating
// After both animations have started, verify that they have valid
// start times.
num_swap_buffers_++;
- AnimationRegistrar::AnimationControllerMap copy =
+ AnimationRegistrar::AnimationControllerMap controllers_copy =
host_impl->animation_registrar()->active_animation_controllers();
- if (copy.size() == 2u) {
+ if (controllers_copy.size() == 2u) {
EndTest();
EXPECT_GE(num_swap_buffers_, 3);
- for (AnimationRegistrar::AnimationControllerMap::iterator iter =
- copy.begin();
- iter != copy.end();
- ++iter) {
- int id = ((*iter).second->id());
+ for (auto& it : controllers_copy) {
+ int id = it.first;
if (id == host_impl->RootLayer()->id()) {
- Animation* anim = (*iter).second->GetAnimation(Animation::TRANSFORM);
+ Animation* anim = it.second->GetAnimation(Animation::TRANSFORM);
EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
} else if (id == host_impl->RootLayer()->children()[0]->id()) {
- Animation* anim = (*iter).second->GetAnimation(Animation::OPACITY);
+ Animation* anim = it.second->GetAnimation(Animation::OPACITY);
EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
}
}
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698