Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: cc/test/animation_timelines_test_common.cc

Issue 2554773002: CC Animation: Rename Active Players to Ticking Players. (Closed)
Patch Set: Rename the argument. Created 4 years 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 unified diff | Download patch
« no previous file with comments | « cc/test/animation_timelines_test_common.h ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/animation_timelines_test_common.h" 5 #include "cc/test/animation_timelines_test_common.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/animation/animation_events.h" 8 #include "cc/animation/animation_events.h"
9 #include "cc/animation/animation_id_provider.h" 9 #include "cc/animation/animation_id_provider.h"
10 #include "cc/animation/animation_player.h" 10 #include "cc/animation/animation_player.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 element_animations_impl_ = player_impl_->element_animations(); 417 element_animations_impl_ = player_impl_->element_animations();
418 } 418 }
419 419
420 void AnimationTimelinesTest::ReleaseRefPtrs() { 420 void AnimationTimelinesTest::ReleaseRefPtrs() {
421 player_ = nullptr; 421 player_ = nullptr;
422 timeline_ = nullptr; 422 timeline_ = nullptr;
423 player_impl_ = nullptr; 423 player_impl_ = nullptr;
424 timeline_impl_ = nullptr; 424 timeline_impl_ = nullptr;
425 } 425 }
426 426
427 void AnimationTimelinesTest::AnimateLayersTransferEvents( 427 void AnimationTimelinesTest::TickAnimationsTransferEvents(
428 base::TimeTicks time, 428 base::TimeTicks time,
429 unsigned expect_events) { 429 unsigned expect_events) {
430 std::unique_ptr<MutatorEvents> events = host_->CreateEvents(); 430 std::unique_ptr<MutatorEvents> events = host_->CreateEvents();
431 431
432 host_impl_->AnimateLayers(time); 432 host_impl_->TickAnimations(time);
433 host_impl_->UpdateAnimationState(true, events.get()); 433 host_impl_->UpdateAnimationState(true, events.get());
434 434
435 auto animation_events = static_cast<const AnimationEvents*>(events.get()); 435 auto animation_events = static_cast<const AnimationEvents*>(events.get());
436 EXPECT_EQ(expect_events, animation_events->events_.size()); 436 EXPECT_EQ(expect_events, animation_events->events_.size());
437 437
438 host_->AnimateLayers(time); 438 host_->TickAnimations(time);
439 host_->UpdateAnimationState(true, nullptr); 439 host_->UpdateAnimationState(true, nullptr);
440 host_->SetAnimationEvents(std::move(events)); 440 host_->SetAnimationEvents(std::move(events));
441 } 441 }
442 442
443 AnimationPlayer* AnimationTimelinesTest::GetPlayerForElementId( 443 AnimationPlayer* AnimationTimelinesTest::GetPlayerForElementId(
444 ElementId element_id) { 444 ElementId element_id) {
445 const scoped_refptr<ElementAnimations> element_animations = 445 const scoped_refptr<ElementAnimations> element_animations =
446 host_->GetElementAnimationsForElementId(element_id); 446 host_->GetElementAnimationsForElementId(element_id);
447 return element_animations ? &*element_animations->players_list().begin() 447 return element_animations ? &*element_animations->players_list().begin()
448 : nullptr; 448 : nullptr;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 } 488 }
489 489
490 return result; 490 return result;
491 } 491 }
492 492
493 void AnimationTimelinesTest::PushProperties() { 493 void AnimationTimelinesTest::PushProperties() {
494 host_->PushPropertiesTo(host_impl_); 494 host_->PushPropertiesTo(host_impl_);
495 } 495 }
496 496
497 } // namespace cc 497 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_timelines_test_common.h ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698