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_COMMON_H_ | 5 #ifndef CC_TEST_LAYER_TREE_TEST_COMMON_H_ |
6 #define CC_TEST_LAYER_TREE_TEST_COMMON_H_ | 6 #define CC_TEST_LAYER_TREE_TEST_COMMON_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/base/thread.h" | 10 #include "cc/base/thread.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class LayerTreeHost; | 23 class LayerTreeHost; |
24 class LayerTreeHostClient; | 24 class LayerTreeHostClient; |
25 class LayerTreeHostImpl; | 25 class LayerTreeHostImpl; |
26 | 26 |
27 // Used by test stubs to notify the test when something interesting happens. | 27 // Used by test stubs to notify the test when something interesting happens. |
28 class TestHooks : public WebKit::WebAnimationDelegate { | 28 class TestHooks : public WebKit::WebAnimationDelegate { |
29 public: | 29 public: |
30 TestHooks(); | 30 TestHooks(); |
31 virtual ~TestHooks(); | 31 virtual ~TestHooks(); |
32 | 32 |
| 33 void ReadSettings(const LayerTreeSettings& settings); |
| 34 |
33 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {} | 35 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) {} |
34 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} | 36 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) {} |
35 virtual void TreeActivatedOnThread(LayerTreeHostImpl* host_impl) {} | 37 virtual void TreeActivatedOnThread(LayerTreeHostImpl* host_impl) {} |
36 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, | 38 virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, |
37 bool success) {} | 39 bool success) {} |
38 virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, | 40 virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
39 LayerTreeHostImpl::FrameData* frame_data, | 41 LayerTreeHostImpl::FrameData* frame_data, |
40 bool result); | 42 bool result); |
41 virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) {} | 43 virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) {} |
42 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) {} | 44 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) {} |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 #define MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ | 175 #define MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ |
174 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \ | 176 TEST_F(TEST_FIXTURE_NAME, RunMultiThread) { \ |
175 RunTest(true); \ | 177 RunTest(true); \ |
176 } | 178 } |
177 | 179 |
178 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ | 180 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ |
179 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME) \ | 181 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME) \ |
180 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) | 182 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) |
181 | 183 |
182 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_ | 184 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_ |
OLD | NEW |