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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 virtual void ScheduledActionWillSendBeginMainFrame() {} | 85 virtual void ScheduledActionWillSendBeginMainFrame() {} |
86 virtual void ScheduledActionSendBeginMainFrame() {} | 86 virtual void ScheduledActionSendBeginMainFrame() {} |
87 virtual void ScheduledActionDrawAndSwapIfPossible() {} | 87 virtual void ScheduledActionDrawAndSwapIfPossible() {} |
88 virtual void ScheduledActionAnimate() {} | 88 virtual void ScheduledActionAnimate() {} |
89 virtual void ScheduledActionCommit() {} | 89 virtual void ScheduledActionCommit() {} |
90 virtual void ScheduledActionBeginOutputSurfaceCreation() {} | 90 virtual void ScheduledActionBeginOutputSurfaceCreation() {} |
91 | 91 |
92 // Implementation of AnimationDelegate: | 92 // Implementation of AnimationDelegate: |
93 virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time, | 93 virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time, |
94 Animation::TargetProperty target_property) | 94 Animation::TargetProperty target_property) |
95 OVERRIDE {} | 95 override {} |
96 virtual void NotifyAnimationFinished( | 96 virtual void NotifyAnimationFinished( |
97 base::TimeTicks monotonic_time, | 97 base::TimeTicks monotonic_time, |
98 Animation::TargetProperty target_property) OVERRIDE {} | 98 Animation::TargetProperty target_property) override {} |
99 | 99 |
100 virtual void RequestNewOutputSurface(bool fallback) = 0; | 100 virtual void RequestNewOutputSurface(bool fallback) = 0; |
101 }; | 101 }; |
102 | 102 |
103 class BeginTask; | 103 class BeginTask; |
104 class LayerTreeHostClientForTesting; | 104 class LayerTreeHostClientForTesting; |
105 class TimeoutTask; | 105 class TimeoutTask; |
106 | 106 |
107 // The LayerTreeTests runs with the main loop running. It instantiates a single | 107 // The LayerTreeTests runs with the main loop running. It instantiates a single |
108 // LayerTreeHostForTesting and associated LayerTreeHostImplForTesting and | 108 // LayerTreeHostForTesting and associated LayerTreeHostImplForTesting and |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 bool TestEnded() const { return ended_; } | 180 bool TestEnded() const { return ended_; } |
181 | 181 |
182 LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } | 182 LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } |
183 bool delegating_renderer() const { return delegating_renderer_; } | 183 bool delegating_renderer() const { return delegating_renderer_; } |
184 FakeOutputSurface* output_surface() { return output_surface_; } | 184 FakeOutputSurface* output_surface() { return output_surface_; } |
185 int LastCommittedSourceFrameNumber(LayerTreeHostImpl* impl) const; | 185 int LastCommittedSourceFrameNumber(LayerTreeHostImpl* impl) const; |
186 | 186 |
187 void DestroyLayerTreeHost(); | 187 void DestroyLayerTreeHost(); |
188 | 188 |
189 // By default, output surface recreation is synchronous. | 189 // By default, output surface recreation is synchronous. |
190 virtual void RequestNewOutputSurface(bool fallback) OVERRIDE; | 190 virtual void RequestNewOutputSurface(bool fallback) override; |
191 // Override this for pixel tests, where you need a real output surface. | 191 // Override this for pixel tests, where you need a real output surface. |
192 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback); | 192 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback); |
193 // Override this for unit tests, which should not produce pixel output. | 193 // Override this for unit tests, which should not produce pixel output. |
194 virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback); | 194 virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback); |
195 | 195 |
196 TestWebGraphicsContext3D* TestContext(); | 196 TestWebGraphicsContext3D* TestContext(); |
197 | 197 |
198 | 198 |
199 private: | 199 private: |
200 LayerTreeSettings settings_; | 200 LayerTreeSettings settings_; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 | 291 |
292 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ | 292 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ |
293 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ | 293 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) | 294 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) |
295 | 295 |
296 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ | 296 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ |
297 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ | 297 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ |
298 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) | 298 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) |
299 | 299 |
300 #endif // CC_TEST_LAYER_TREE_TEST_H_ | 300 #endif // CC_TEST_LAYER_TREE_TEST_H_ |
OLD | NEW |