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