| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef CC_TEST_LAYER_TREE_TEST_H_ | 5 #ifndef CC_TEST_LAYER_TREE_TEST_H_ |
| 6 #define CC_TEST_LAYER_TREE_TEST_H_ | 6 #define CC_TEST_LAYER_TREE_TEST_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
| 10 #include "cc/animation/animation_delegate.h" | 10 #include "cc/animation/animation_delegate.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation); | 127 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation); |
| 128 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation); | 128 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation); |
| 129 void PostAddLongAnimationToMainThread(Layer* layer_to_receive_animation); | 129 void PostAddLongAnimationToMainThread(Layer* layer_to_receive_animation); |
| 130 void PostSetNeedsCommitToMainThread(); | 130 void PostSetNeedsCommitToMainThread(); |
| 131 void PostSetNeedsUpdateLayersToMainThread(); | 131 void PostSetNeedsUpdateLayersToMainThread(); |
| 132 void PostSetNeedsRedrawToMainThread(); | 132 void PostSetNeedsRedrawToMainThread(); |
| 133 void PostSetNeedsRedrawRectToMainThread(const gfx::Rect& damage_rect); | 133 void PostSetNeedsRedrawRectToMainThread(const gfx::Rect& damage_rect); |
| 134 void PostSetVisibleToMainThread(bool visible); | 134 void PostSetVisibleToMainThread(bool visible); |
| 135 void PostSetNextCommitForcesRedrawToMainThread(); | 135 void PostSetNextCommitForcesRedrawToMainThread(); |
| 136 void PostCompositeImmediatelyToMainThread(); |
| 136 | 137 |
| 137 void DoBeginTest(); | 138 void DoBeginTest(); |
| 138 void Timeout(); | 139 void Timeout(); |
| 139 | 140 |
| 140 protected: | 141 protected: |
| 141 LayerTreeTest(); | 142 LayerTreeTest(); |
| 142 | 143 |
| 143 virtual void InitializeSettings(LayerTreeSettings* settings) {} | 144 virtual void InitializeSettings(LayerTreeSettings* settings) {} |
| 144 | 145 |
| 145 void RealEndTest(); | 146 void RealEndTest(); |
| 146 | 147 |
| 147 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation, | 148 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation, |
| 148 double animation_duration); | 149 double animation_duration); |
| 149 void DispatchSetNeedsCommit(); | 150 void DispatchSetNeedsCommit(); |
| 150 void DispatchSetNeedsUpdateLayers(); | 151 void DispatchSetNeedsUpdateLayers(); |
| 151 void DispatchSetNeedsRedraw(); | 152 void DispatchSetNeedsRedraw(); |
| 152 void DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect); | 153 void DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect); |
| 153 void DispatchSetVisible(bool visible); | 154 void DispatchSetVisible(bool visible); |
| 154 void DispatchSetNextCommitForcesRedraw(); | 155 void DispatchSetNextCommitForcesRedraw(); |
| 155 void DispatchDidAddAnimation(); | 156 void DispatchDidAddAnimation(); |
| 157 void DispatchCompositeImmediately(); |
| 156 | 158 |
| 157 virtual void AfterTest() = 0; | 159 virtual void AfterTest() = 0; |
| 158 virtual void WillBeginTest(); | 160 virtual void WillBeginTest(); |
| 159 virtual void BeginTest() = 0; | 161 virtual void BeginTest() = 0; |
| 160 virtual void SetupTree(); | 162 virtual void SetupTree(); |
| 161 | 163 |
| 162 virtual void RunTest(bool threaded, | 164 virtual void RunTest(bool threaded, |
| 163 bool delegating_renderer, | 165 bool delegating_renderer, |
| 164 bool impl_side_painting); | 166 bool impl_side_painting); |
| 165 virtual void RunTestWithImplSidePainting(); | 167 virtual void RunTestWithImplSidePainting(); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ | 321 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ |
| 320 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) | 322 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) |
| 321 | 323 |
| 322 // Some tests want to control when notify ready for activation occurs, | 324 // Some tests want to control when notify ready for activation occurs, |
| 323 // but this is not supported in the single-threaded case. | 325 // but this is not supported in the single-threaded case. |
| 324 #define SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \ | 326 #define SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \ |
| 325 SINGLE_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ | 327 SINGLE_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ |
| 326 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) | 328 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) |
| 327 | 329 |
| 328 #endif // CC_TEST_LAYER_TREE_TEST_H_ | 330 #endif // CC_TEST_LAYER_TREE_TEST_H_ |
| OLD | NEW |