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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 virtual void EndTest(); | 116 virtual void EndTest(); |
117 void EndTestAfterDelay(int delay_milliseconds); | 117 void EndTestAfterDelay(int delay_milliseconds); |
118 | 118 |
119 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation); | 119 void PostAddAnimationToMainThread(Layer* layer_to_receive_animation); |
120 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation); | 120 void PostAddInstantAnimationToMainThread(Layer* layer_to_receive_animation); |
121 void PostAddLongAnimationToMainThread(Layer* layer_to_receive_animation); | 121 void PostAddLongAnimationToMainThread(Layer* layer_to_receive_animation); |
122 void PostSetNeedsCommitToMainThread(); | 122 void PostSetNeedsCommitToMainThread(); |
123 void PostSetNeedsUpdateLayersToMainThread(); | 123 void PostSetNeedsUpdateLayersToMainThread(); |
124 void PostReadbackToMainThread(); | 124 void PostReadbackToMainThread(); |
125 void PostAcquireLayerTextures(); | |
126 void PostSetNeedsRedrawToMainThread(); | 125 void PostSetNeedsRedrawToMainThread(); |
127 void PostSetNeedsRedrawRectToMainThread(const gfx::Rect& damage_rect); | 126 void PostSetNeedsRedrawRectToMainThread(const gfx::Rect& damage_rect); |
128 void PostSetVisibleToMainThread(bool visible); | 127 void PostSetVisibleToMainThread(bool visible); |
129 void PostSetNextCommitForcesRedrawToMainThread(); | 128 void PostSetNextCommitForcesRedrawToMainThread(); |
130 | 129 |
131 void DoBeginTest(); | 130 void DoBeginTest(); |
132 void Timeout(); | 131 void Timeout(); |
133 | 132 |
134 protected: | 133 protected: |
135 LayerTreeTest(); | 134 LayerTreeTest(); |
136 | 135 |
137 virtual void InitializeSettings(LayerTreeSettings* settings) {} | 136 virtual void InitializeSettings(LayerTreeSettings* settings) {} |
138 | 137 |
139 virtual void ScheduleComposite() OVERRIDE; | 138 virtual void ScheduleComposite() OVERRIDE; |
140 | 139 |
141 void RealEndTest(); | 140 void RealEndTest(); |
142 | 141 |
143 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation, | 142 virtual void DispatchAddAnimation(Layer* layer_to_receive_animation, |
144 double animation_duration); | 143 double animation_duration); |
145 void DispatchSetNeedsCommit(); | 144 void DispatchSetNeedsCommit(); |
146 void DispatchSetNeedsUpdateLayers(); | 145 void DispatchSetNeedsUpdateLayers(); |
147 void DispatchReadback(); | 146 void DispatchReadback(); |
148 void DispatchAcquireLayerTextures(); | |
149 void DispatchSetNeedsRedraw(); | 147 void DispatchSetNeedsRedraw(); |
150 void DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect); | 148 void DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect); |
151 void DispatchSetVisible(bool visible); | 149 void DispatchSetVisible(bool visible); |
152 void DispatchSetNextCommitForcesRedraw(); | 150 void DispatchSetNextCommitForcesRedraw(); |
153 void DispatchComposite(); | 151 void DispatchComposite(); |
154 void DispatchDidAddAnimation(); | 152 void DispatchDidAddAnimation(); |
155 | 153 |
156 virtual void AfterTest() = 0; | 154 virtual void AfterTest() = 0; |
157 virtual void WillBeginTest(); | 155 virtual void WillBeginTest(); |
158 virtual void BeginTest() = 0; | 156 virtual void BeginTest() = 0; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 | 289 |
292 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ | 290 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ |
293 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ | 291 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ |
294 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) | 292 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) |
295 | 293 |
296 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ | 294 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ |
297 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ | 295 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ |
298 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) | 296 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) |
299 | 297 |
300 #endif // CC_TEST_LAYER_TREE_TEST_H_ | 298 #endif // CC_TEST_LAYER_TREE_TEST_H_ |
OLD | NEW |