| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layer_tree_host.h" | 5 #include "cc/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "cc/animation_curve.h" | 7 #include "cc/animation_curve.h" |
| 8 #include "cc/layer.h" | 8 #include "cc/layer.h" |
| 9 #include "cc/layer_animation_controller.h" | 9 #include "cc/layer_animation_controller.h" |
| 10 #include "cc/layer_impl.h" | 10 #include "cc/layer_impl.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // handling the case where setNeedsAnimate() is called inside the begin frame | 79 // handling the case where setNeedsAnimate() is called inside the begin frame |
| 80 // flow. | 80 // flow. |
| 81 class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback : | 81 class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback : |
| 82 public LayerTreeHostAnimationTest { | 82 public LayerTreeHostAnimationTest { |
| 83 public: | 83 public: |
| 84 LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback() | 84 LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback() |
| 85 : num_animates_(0) { | 85 : num_animates_(0) { |
| 86 } | 86 } |
| 87 | 87 |
| 88 virtual void beginTest() OVERRIDE { | 88 virtual void beginTest() OVERRIDE { |
| 89 postSetNeedsAnimateToMainThread(); | 89 postSetNeedsCommitToMainThread(); |
| 90 } | 90 } |
| 91 | 91 |
| 92 virtual void animate(base::TimeTicks) OVERRIDE { | 92 virtual void animate(base::TimeTicks) OVERRIDE { |
| 93 if (!num_animates_) { | 93 if (!num_animates_) { |
| 94 m_layerTreeHost->setNeedsAnimate(); | 94 m_layerTreeHost->setNeedsAnimate(); |
| 95 num_animates_++; | 95 num_animates_++; |
| 96 return; | 96 return; |
| 97 } | 97 } |
| 98 endTest(); | 98 endTest(); |
| 99 } | 99 } |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 | 532 |
| 533 private: | 533 private: |
| 534 int num_commit_complete_; | 534 int num_commit_complete_; |
| 535 int num_draw_layers_; | 535 int num_draw_layers_; |
| 536 }; | 536 }; |
| 537 | 537 |
| 538 MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestContinuousAnimate) | 538 MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestContinuousAnimate) |
| 539 | 539 |
| 540 } // namespace | 540 } // namespace |
| 541 } // namespace cc | 541 } // namespace cc |
| OLD | NEW |