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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 1101823002: CC Animations: Make LayerAnimationController creation optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
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 93202a0a57fdf7536e3f43f76ad98a48e5dc8add..564a1bb06b809f412542b2c10af535444dad39b2 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -282,8 +282,8 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes
LayerTreeHostAnimationTest::SetupTree();
content_ = FakeContentLayer::Create(&client_);
content_->SetBounds(gfx::Size(4, 4));
- content_->set_layer_animation_delegate(this);
layer_tree_host()->root_layer()->AddChild(content_);
+ content_->set_layer_animation_delegate(this);
}
void BeginTest() override { PostAddAnimationToMainThread(content_.get()); }
@@ -411,6 +411,8 @@ class LayerTreeHostAnimationTestLayerAddedWithAnimation
void DidCommit() override {
if (layer_tree_host()->source_frame_number() == 1) {
scoped_refptr<Layer> layer = Layer::Create();
+ layer->RegisterForAnimations(layer_tree_host()->animation_registrar(),
+ layer_tree_host()->settings());
layer->set_layer_animation_delegate(this);
// Any valid AnimationCurve will do here.
@@ -560,8 +562,8 @@ class LayerTreeHostAnimationTestRunAnimationWhenNotCanDraw
LayerTreeHostAnimationTest::SetupTree();
content_ = FakeContentLayer::Create(&client_);
content_->SetBounds(gfx::Size(4, 4));
- content_->set_layer_animation_delegate(this);
layer_tree_host()->root_layer()->AddChild(content_);
+ content_->set_layer_animation_delegate(this);
}
void BeginTest() override {
@@ -600,8 +602,8 @@ class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations
LayerTreeHostAnimationTest::SetupTree();
content_ = FakeContentLayer::Create(&client_);
content_->SetBounds(gfx::Size(4, 4));
- content_->set_layer_animation_delegate(this);
layer_tree_host()->root_layer()->AddChild(content_);
+ content_->set_layer_animation_delegate(this);
}
void InitializeSettings(LayerTreeSettings* settings) override {

Powered by Google App Engine
This is Rietveld 408576698