| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 void EndTestAfterDelay(int delay_milliseconds); | 108 void EndTestAfterDelay(int delay_milliseconds); |
| 109 | 109 |
| 110 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation); | 110 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation); |
| 111 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation); | 111 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation); |
| 112 void PostSetNeedsCommitToMainThread(); | 112 void PostSetNeedsCommitToMainThread(); |
| 113 void PostReadbackToMainThread(); | 113 void PostReadbackToMainThread(); |
| 114 void PostAcquireLayerTextures(); | 114 void PostAcquireLayerTextures(); |
| 115 void PostSetNeedsRedrawToMainThread(); | 115 void PostSetNeedsRedrawToMainThread(); |
| 116 void PostSetNeedsRedrawRectToMainThread(gfx::Rect damage_rect); | 116 void PostSetNeedsRedrawRectToMainThread(gfx::Rect damage_rect); |
| 117 void PostSetVisibleToMainThread(bool visible); | 117 void PostSetVisibleToMainThread(bool visible); |
| 118 void PostSetNextCommitForcesRedrawToMainThread(); |
| 118 | 119 |
| 119 void DoBeginTest(); | 120 void DoBeginTest(); |
| 120 void Timeout(); | 121 void Timeout(); |
| 121 | 122 |
| 122 protected: | 123 protected: |
| 123 LayerTreeTest(); | 124 LayerTreeTest(); |
| 124 | 125 |
| 125 virtual void InitializeSettings(LayerTreeSettings* settings) {} | 126 virtual void InitializeSettings(LayerTreeSettings* settings) {} |
| 126 | 127 |
| 127 virtual void ScheduleComposite() OVERRIDE; | 128 virtual void ScheduleComposite() OVERRIDE; |
| 128 | 129 |
| 129 void RealEndTest(); | 130 void RealEndTest(); |
| 130 | 131 |
| 131 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation); | 132 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation); |
| 132 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation); | 133 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation); |
| 133 void DispatchSetNeedsCommit(); | 134 void DispatchSetNeedsCommit(); |
| 134 void DispatchReadback(); | 135 void DispatchReadback(); |
| 135 void DispatchAcquireLayerTextures(); | 136 void DispatchAcquireLayerTextures(); |
| 136 void DispatchSetNeedsRedraw(); | 137 void DispatchSetNeedsRedraw(); |
| 137 void DispatchSetNeedsRedrawRect(gfx::Rect damage_rect); | 138 void DispatchSetNeedsRedrawRect(gfx::Rect damage_rect); |
| 138 void DispatchSetVisible(bool visible); | 139 void DispatchSetVisible(bool visible); |
| 140 void DispatchSetNextCommitForcesRedraw(); |
| 139 void DispatchComposite(); | 141 void DispatchComposite(); |
| 140 void DispatchDidAddAnimation(); | 142 void DispatchDidAddAnimation(); |
| 141 | 143 |
| 142 virtual void RunTest(bool threaded, | 144 virtual void RunTest(bool threaded, |
| 143 bool delegating_renderer, | 145 bool delegating_renderer, |
| 144 bool impl_side_painting); | 146 bool impl_side_painting); |
| 145 | 147 |
| 146 bool HasImplThread() { return proxy() ? proxy()->HasImplThread() : false; } | 148 bool HasImplThread() { return proxy() ? proxy()->HasImplThread() : false; } |
| 147 base::SingleThreadTaskRunner* ImplThreadTaskRunner() { | 149 base::SingleThreadTaskRunner* ImplThreadTaskRunner() { |
| 148 DCHECK(proxy()); | 150 DCHECK(proxy()); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 240 |
| 239 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ | 241 #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ |
| 240 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ | 242 SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ |
| 241 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) | 243 MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) |
| 242 | 244 |
| 243 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ | 245 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ |
| 244 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ | 246 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ |
| 245 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) | 247 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) |
| 246 | 248 |
| 247 #endif // CC_TEST_LAYER_TREE_TEST_H_ | 249 #endif // CC_TEST_LAYER_TREE_TEST_H_ |
| OLD | NEW |