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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // be used (such as for pixel tests). Or override it and create your own | 145 // be used (such as for pixel tests). Or override it and create your own |
146 // TestCompositorFrameSink to control how it is created. | 146 // TestCompositorFrameSink to control how it is created. |
147 virtual std::unique_ptr<TestCompositorFrameSink> CreateCompositorFrameSink( | 147 virtual std::unique_ptr<TestCompositorFrameSink> CreateCompositorFrameSink( |
148 scoped_refptr<ContextProvider> compositor_context_provider, | 148 scoped_refptr<ContextProvider> compositor_context_provider, |
149 scoped_refptr<ContextProvider> worker_context_provider); | 149 scoped_refptr<ContextProvider> worker_context_provider); |
150 // Override this and call the base class to change what ContextProvider will | 150 // Override this and call the base class to change what ContextProvider will |
151 // be used, such as to prevent sharing the context with the | 151 // be used, such as to prevent sharing the context with the |
152 // CompositorFrameSink. Or override it and create your own OutputSurface to | 152 // CompositorFrameSink. Or override it and create your own OutputSurface to |
153 // change what type of OutputSurface is used, such as a real OutputSurface for | 153 // change what type of OutputSurface is used, such as a real OutputSurface for |
154 // pixel tests or a software-compositing OutputSurface. | 154 // pixel tests or a software-compositing OutputSurface. |
155 virtual std::unique_ptr<OutputSurface> CreateDisplayOutputSurface( | 155 std::unique_ptr<OutputSurface> CreateDisplayOutputSurfaceOnThread( |
156 scoped_refptr<ContextProvider> compositor_context_provider); | 156 scoped_refptr<ContextProvider> compositor_context_provider) override; |
157 | 157 |
158 bool IsRemoteTest() const; | 158 bool IsRemoteTest() const; |
159 | 159 |
160 gfx::Vector2dF ScrollDelta(LayerImpl* layer_impl); | 160 gfx::Vector2dF ScrollDelta(LayerImpl* layer_impl); |
161 | 161 |
162 private: | 162 private: |
163 virtual void DispatchAddAnimationToPlayer( | 163 virtual void DispatchAddAnimationToPlayer( |
164 AnimationPlayer* player_to_receive_animation, | 164 AnimationPlayer* player_to_receive_animation, |
165 double animation_duration); | 165 double animation_duration); |
166 void DispatchSetDeferCommits(bool defer_commits); | 166 void DispatchSetDeferCommits(bool defer_commits); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 #define SINGLE_MULTI_AND_REMOTE_TEST_F(TEST_FIXTURE_NAME) \ | 236 #define SINGLE_MULTI_AND_REMOTE_TEST_F(TEST_FIXTURE_NAME) \ |
237 SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME); \ | 237 SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME); \ |
238 REMOTE_TEST_F(TEST_FIXTURE_NAME) | 238 REMOTE_TEST_F(TEST_FIXTURE_NAME) |
239 | 239 |
240 // Some tests want to control when notify ready for activation occurs, | 240 // Some tests want to control when notify ready for activation occurs, |
241 // but this is not supported in the single-threaded case. | 241 // but this is not supported in the single-threaded case. |
242 #define MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \ | 242 #define MULTI_THREAD_BLOCKNOTIFY_TEST_F(TEST_FIXTURE_NAME) \ |
243 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) | 243 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) |
244 | 244 |
245 #endif // CC_TEST_LAYER_TREE_TEST_H_ | 245 #endif // CC_TEST_LAYER_TREE_TEST_H_ |
OLD | NEW |