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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // handling the case where setNeedsAnimate() is called inside the begin frame | 78 // handling the case where setNeedsAnimate() is called inside the begin frame |
79 // flow. | 79 // flow. |
80 class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback : | 80 class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback : |
81 public LayerTreeHostAnimationTest { | 81 public LayerTreeHostAnimationTest { |
82 public: | 82 public: |
83 LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback() | 83 LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback() |
84 : num_animates_(0) { | 84 : num_animates_(0) { |
85 } | 85 } |
86 | 86 |
87 virtual void beginTest() OVERRIDE { | 87 virtual void beginTest() OVERRIDE { |
88 postSetNeedsAnimateToMainThread(); | 88 postSetNeedsCommitToMainThread(); |
89 } | 89 } |
90 | 90 |
91 virtual void animate(base::TimeTicks) OVERRIDE { | 91 virtual void animate(base::TimeTicks) OVERRIDE { |
92 if (!num_animates_) { | 92 if (!num_animates_) { |
93 m_layerTreeHost->setNeedsAnimate(); | 93 m_layerTreeHost->setNeedsAnimate(); |
94 num_animates_++; | 94 num_animates_++; |
95 return; | 95 return; |
96 } | 96 } |
97 endTest(); | 97 endTest(); |
98 } | 98 } |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 private: | 391 private: |
392 FakeContentLayerClient client_; | 392 FakeContentLayerClient client_; |
393 scoped_refptr<FakeContentLayer> update_check_layer_; | 393 scoped_refptr<FakeContentLayer> update_check_layer_; |
394 }; | 394 }; |
395 | 395 |
396 MULTI_THREAD_TEST_F( | 396 MULTI_THREAD_TEST_F( |
397 LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity) | 397 LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity) |
398 | 398 |
399 } // namespace | 399 } // namespace |
400 } // namespace cc | 400 } // namespace cc |
OLD | NEW |