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