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 45387578c84266310831645335b9dccd2197a468..1748bf08e6c5c50bab36f5f07f8c261a5c3349db 100644 |
--- a/cc/trees/layer_tree_host_unittest_animation.cc |
+++ b/cc/trees/layer_tree_host_unittest_animation.cc |
@@ -26,12 +26,12 @@ class LayerTreeHostAnimationTest : public LayerTreeTest { |
} |
}; |
-// Makes sure that SetNeedsAnimate does not cause the CommitRequested() state to |
-// be set. |
-class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested |
+// Makes sure that SetNeedsUpdateLayers does not cause the CommitRequested() |
+// state to be set. |
+class LayerTreeHostAnimationTestSetNeedsUpdateLayersShouldNotSetCommitRequested |
: public LayerTreeHostAnimationTest { |
public: |
- LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested() |
+ LayerTreeHostAnimationTestSetNeedsUpdateLayersShouldNotSetCommitRequested() |
: num_commits_(0) {} |
virtual void BeginTest() OVERRIDE { |
@@ -44,7 +44,7 @@ class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested |
if (num_commits_ != 1) |
return; |
- layer_tree_host()->SetNeedsAnimate(); |
+ layer_tree_host()->SetNeedsUpdateLayers(); |
// Right now, CommitRequested is going to be true, because during |
// BeginFrame, we force CommitRequested to true to prevent requests from |
// hitting the impl thread. But, when the next DidCommit happens, we should |
@@ -54,11 +54,11 @@ class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested |
virtual void DidCommit() OVERRIDE { |
if (!num_commits_) { |
EXPECT_FALSE(layer_tree_host()->CommitRequested()); |
- layer_tree_host()->SetNeedsAnimate(); |
+ layer_tree_host()->SetNeedsUpdateLayers(); |
EXPECT_FALSE(layer_tree_host()->CommitRequested()); |
} |
- // Verifies that the SetNeedsAnimate we made in ::Animate did not |
+ // Verifies that the SetNeedsUpdateLayers we made in ::Animate did not |
// trigger CommitRequested. |
EXPECT_FALSE(layer_tree_host()->CommitRequested()); |
EndTest(); |
@@ -72,17 +72,17 @@ class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested |
}; |
MULTI_THREAD_TEST_F( |
- LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested); |
+ LayerTreeHostAnimationTestSetNeedsUpdateLayersShouldNotSetCommitRequested); |
// Trigger a frame with SetNeedsCommit. Then, inside the resulting animate |
-// callback, request another frame using SetNeedsAnimate. End the test when |
+// callback, request another frame using SetNeedsUpdateLayers. End the test when |
// animate gets called yet-again, indicating that the proxy is correctly |
-// handling the case where SetNeedsAnimate() is called inside the BeginFrame |
-// flow. |
-class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback |
+// handling the case where SetNeedsUpdateLayers() is called inside the |
+// BeginFrame flow. |
+class LayerTreeHostAnimationTestSetNeedsUpdateLayersInsideAnimationCallback |
: public LayerTreeHostAnimationTest { |
public: |
- LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback() |
+ LayerTreeHostAnimationTestSetNeedsUpdateLayersInsideAnimationCallback() |
: num_animates_(0) {} |
virtual void BeginTest() OVERRIDE { |
@@ -91,7 +91,7 @@ class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback |
virtual void Animate(base::TimeTicks) OVERRIDE { |
if (!num_animates_) { |
- layer_tree_host()->SetNeedsAnimate(); |
+ layer_tree_host()->SetNeedsUpdateLayers(); |
num_animates_++; |
return; |
} |
@@ -105,7 +105,7 @@ class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback |
}; |
MULTI_THREAD_TEST_F( |
- LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback); |
+ LayerTreeHostAnimationTestSetNeedsUpdateLayersInsideAnimationCallback); |
// Add a layer animation and confirm that |
// LayerTreeHostImpl::updateAnimationState does get called and continues to |
@@ -720,11 +720,16 @@ class LayerTreeHostAnimationTestContinuousAnimate |
virtual void Animate(base::TimeTicks) OVERRIDE { |
if (num_draw_layers_ == 2) |
return; |
- layer_tree_host()->SetNeedsAnimate(); |
+ layer_tree_host()->SetNeedsUpdateLayers(); |
} |
virtual void Layout() OVERRIDE { |
layer_tree_host()->root_layer()->SetNeedsDisplay(); |
+ |
+ // TODO(trchen): This test is broken. |
enne (OOO)
2013/11/19 01:48:47
Add a FakeContentLayer and set_needs_always_update
|
+ // We shouldn't need to request commit here. The commit is supposed to be |
+ // triggered by tile updates, however mock layers never update tiles. |
+ layer_tree_host()->SetNeedsCommit(); |
} |
virtual void CommitCompleteOnThread(LayerTreeHostImpl* tree_impl) OVERRIDE { |