| 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 cfde40b7de85e95a5154c5e6d43deff74cc0f586..2c6efaa31ff9a961bd435ec0dcd647ba334d1cf6 100644
|
| --- a/cc/trees/layer_tree_host_unittest_animation.cc
|
| +++ b/cc/trees/layer_tree_host_unittest_animation.cc
|
| @@ -24,7 +24,7 @@ class LayerTreeHostAnimationTest : public LayerTreeTest {
|
| }
|
| };
|
|
|
| -// Makes sure that setNeedsAnimate does not cause the commitRequested() state to
|
| +// Makes sure that SetNeedsAnimate does not cause the CommitRequested() state to
|
| // be set.
|
| class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested :
|
| public LayerTreeHostAnimationTest {
|
| @@ -37,17 +37,17 @@ class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested :
|
| PostSetNeedsCommitToMainThread();
|
| }
|
|
|
| - virtual void Animate(base::TimeTicks monotonicTime) OVERRIDE {
|
| + virtual void Animate(base::TimeTicks monotonic_time) OVERRIDE {
|
| // We skip the first commit becasue its the commit that populates the
|
| // impl thread with a tree. After the second commit, the test is done.
|
| if (num_commits_ != 1)
|
| return;
|
|
|
| layer_tree_host()->SetNeedsAnimate();
|
| - // 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
|
| - // verify that commitRequested has gone back to false.
|
| + // 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
|
| + // verify that CommitRequested has gone back to false.
|
| }
|
|
|
| virtual void DidCommit() OVERRIDE {
|
| @@ -57,8 +57,8 @@ class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested :
|
| EXPECT_FALSE(layer_tree_host()->CommitRequested());
|
| }
|
|
|
| - // Verifies that the setNeedsAnimate we made in ::animate did not
|
| - // trigger commitRequested.
|
| + // Verifies that the SetNeedsAnimate we made in ::animate did not
|
| + // trigger CommitRequested.
|
| EXPECT_FALSE(layer_tree_host()->CommitRequested());
|
| EndTest();
|
| num_commits_++;
|
| @@ -73,10 +73,10 @@ class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested :
|
| MULTI_THREAD_TEST_F(
|
| LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested)
|
|
|
| -// Trigger a frame with setNeedsCommit. Then, inside the resulting animate
|
| -// callback, requet another frame using setNeedsAnimate. End the test when
|
| +// Trigger a frame with SetNeedsCommit. Then, inside the resulting animate
|
| +// callback, requet another frame using SetNeedsAnimate. End the test when
|
| // animate gets called yet-again, indicating that the proxy is correctly
|
| -// handling the case where setNeedsAnimate() is called inside the begin frame
|
| +// handling the case where SetNeedsAnimate() is called inside the begin frame
|
| // flow.
|
| class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback :
|
| public LayerTreeHostAnimationTest {
|
| @@ -108,7 +108,7 @@ MULTI_THREAD_TEST_F(
|
| LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback)
|
|
|
| // Add a layer animation and confirm that
|
| -// LayerTreeHostImpl::updateAnimationState does get called and continues to
|
| +// LayerTreeHostImpl::UpdateAnimationState does get called and continues to
|
| // get called.
|
| class LayerTreeHostAnimationTestAddAnimation :
|
| public LayerTreeHostAnimationTest {
|
| @@ -125,11 +125,11 @@ class LayerTreeHostAnimationTestAddAnimation :
|
|
|
| virtual void UpdateAnimationState(
|
| LayerTreeHostImpl* impl_host,
|
| - bool hasUnfinishedAnimation) OVERRIDE {
|
| + bool has_unfinished_animation) OVERRIDE {
|
| if (!num_animates_) {
|
| - // The animation had zero duration so layerTreeHostImpl should no
|
| + // The animation had zero duration so LayerTreeHostImpl should no
|
| // longer need to animate its layers.
|
| - EXPECT_FALSE(hasUnfinishedAnimation);
|
| + EXPECT_FALSE(has_unfinished_animation);
|
| num_animates_++;
|
| return;
|
| }
|
| @@ -174,7 +174,7 @@ class LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws :
|
|
|
| virtual void AnimateLayers(
|
| LayerTreeHostImpl* host_impl,
|
| - base::TimeTicks monotonicTime) OVERRIDE {
|
| + base::TimeTicks monotonic_time) OVERRIDE {
|
| started_animating_ = true;
|
| }
|
|
|
| @@ -211,12 +211,12 @@ class LayerTreeHostAnimationTestTickAnimationWhileBackgrounded :
|
| PostAddAnimationToMainThread(layer_tree_host()->root_layer());
|
| }
|
|
|
| - // Use willAnimateLayers to set visible false before the animation runs and
|
| + // Use WillAnimateLayers to set visible false before the animation runs and
|
| // causes a commit, so we block the second visible animate in single-thread
|
| // mode.
|
| virtual void WillAnimateLayers(
|
| LayerTreeHostImpl* host_impl,
|
| - base::TimeTicks monotonicTime) OVERRIDE {
|
| + base::TimeTicks monotonic_time) OVERRIDE {
|
| if (num_animates_ < 2) {
|
| if (!num_animates_) {
|
| // We have a long animation running. It should continue to tick even
|
| @@ -250,7 +250,7 @@ public:
|
|
|
| virtual void AnimateLayers(
|
| LayerTreeHostImpl* host_impl,
|
| - base::TimeTicks monotonicTime) OVERRIDE {
|
| + base::TimeTicks monotonic_time) OVERRIDE {
|
| LayerAnimationController* controller =
|
| layer_tree_host()->root_layer()->layer_animation_controller();
|
| Animation* animation =
|
| @@ -260,10 +260,10 @@ public:
|
|
|
| const FloatAnimationCurve* curve =
|
| animation->curve()->ToFloatAnimationCurve();
|
| - float startOpacity = curve->GetValue(0);
|
| - float endOpacity = curve->GetValue(curve->Duration());
|
| + float start_opacity = curve->GetValue(0);
|
| + float end_opacity = curve->GetValue(curve->Duration());
|
| float linearly_interpolated_opacity =
|
| - 0.25 * endOpacity + 0.75 * startOpacity;
|
| + 0.25 * end_opacity + 0.75 * start_opacity;
|
| double time = curve->Duration() * 0.25;
|
| // If the linear timing function associated with this animation was not
|
| // picked up, then the linearly interpolated opacity would be different
|
| @@ -314,7 +314,7 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes :
|
|
|
| virtual void UpdateAnimationState(
|
| LayerTreeHostImpl* impl_host,
|
| - bool hasUnfinishedAnimation) OVERRIDE {
|
| + bool has_unfinished_animation) OVERRIDE {
|
| LayerAnimationController* controller =
|
| impl_host->RootLayer()->layer_animation_controller();
|
| Animation* animation =
|
| @@ -455,8 +455,8 @@ class LayerTreeHostAnimationTestCompositeAndReadbackAnimateCount :
|
| }
|
|
|
| virtual void Animate(base::TimeTicks) OVERRIDE {
|
| - // We shouldn't animate on the compositeAndReadback-forced commit, but we
|
| - // should for the setNeedsCommit-triggered commit.
|
| + // We shouldn't animate on the CompositeAndReadback-forced commit, but we
|
| + // should for the SetNeedsCommit-triggered commit.
|
| animated_commit_ = layer_tree_host()->commit_number();
|
| EXPECT_NE(2, animated_commit_);
|
| }
|
|
|