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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 14179022: Shouldn't access LayerTreeTest::layer_tree_host on impl thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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/test/layer_tree_test.cc ('k') | cc/trees/single_thread_proxy.cc » ('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 43e0b2a14a1cded2df9f44f0798c542a729caaf2..cf2a42f821f6e75e7dfcf751dd498f6166db8acd 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -291,7 +291,6 @@ class LayerTreeHostAnimationTestTickAnimationWhileBackgrounded
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestTickAnimationWhileBackgrounded);
-// Ensures that animations continue to be ticked when we are backgrounded.
class LayerTreeHostAnimationTestAddAnimationWithTimingFunction
: public LayerTreeHostAnimationTest {
public:
@@ -301,6 +300,7 @@ class LayerTreeHostAnimationTestAddAnimationWithTimingFunction
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_);
}
@@ -308,17 +308,12 @@ class LayerTreeHostAnimationTestAddAnimationWithTimingFunction
PostAddAnimationToMainThread(content_);
}
- virtual void AnimateLayers(
- LayerTreeHostImpl* host_impl,
- base::TimeTicks monotonic_time) OVERRIDE {
+ virtual void notifyAnimationStarted(double wallClockTime) OVERRIDE {
LayerAnimationController* controller =
layer_tree_host()->root_layer()->children()[0]->
layer_animation_controller();
Animation* animation =
controller->GetAnimation(Animation::Opacity);
- if (!animation)
- return;
-
const FloatAnimationCurve* curve =
animation->curve()->ToFloatAnimationCurve();
float start_opacity = curve->GetValue(0.0);
@@ -331,14 +326,8 @@ class LayerTreeHostAnimationTestAddAnimationWithTimingFunction
// because of the default ease timing function.
EXPECT_FLOAT_EQ(linearly_interpolated_opacity, curve->GetValue(time));
- LayerAnimationController* controller_impl =
- host_impl->active_tree()->root_layer()->children()[0]->
- layer_animation_controller();
- Animation* animation_impl =
- controller_impl->GetAnimation(Animation::Opacity);
-
controller->RemoveAnimation(animation->id());
- controller_impl->RemoveAnimation(animation_impl->id());
+
EndTest();
}
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698