OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FAKE_LAYER_TREE_HOST_H_ | 5 #ifndef CC_TEST_FAKE_LAYER_TREE_HOST_H_ |
6 #define CC_TEST_FAKE_LAYER_TREE_HOST_H_ | 6 #define CC_TEST_FAKE_LAYER_TREE_HOST_H_ |
7 | 7 |
8 #include "cc/debug/micro_benchmark_controller.h" | 8 #include "cc/debug/micro_benchmark_controller.h" |
9 #include "cc/test/fake_impl_task_runner_provider.h" | 9 #include "cc/test/fake_impl_task_runner_provider.h" |
10 #include "cc/test/fake_layer_tree_host_client.h" | 10 #include "cc/test/fake_layer_tree_host_client.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 LayerImpl* CommitAndCreateLayerImplTree(); | 60 LayerImpl* CommitAndCreateLayerImplTree(); |
61 LayerImpl* CommitAndCreatePendingTree(); | 61 LayerImpl* CommitAndCreatePendingTree(); |
62 | 62 |
63 FakeLayerTreeHostImpl* host_impl() { return &host_impl_; } | 63 FakeLayerTreeHostImpl* host_impl() { return &host_impl_; } |
64 LayerTreeImpl* active_tree() { return host_impl_.active_tree(); } | 64 LayerTreeImpl* active_tree() { return host_impl_.active_tree(); } |
65 LayerTreeImpl* pending_tree() { return host_impl_.pending_tree(); } | 65 LayerTreeImpl* pending_tree() { return host_impl_.pending_tree(); } |
66 | 66 |
67 using LayerTreeHost::ScheduleMicroBenchmark; | 67 using LayerTreeHost::ScheduleMicroBenchmark; |
68 using LayerTreeHost::SendMessageToMicroBenchmark; | 68 using LayerTreeHost::SendMessageToMicroBenchmark; |
69 using LayerTreeHost::SetOutputSurfaceLostForTesting; | |
70 using LayerTreeHost::InitializeSingleThreaded; | 69 using LayerTreeHost::InitializeSingleThreaded; |
71 using LayerTreeHost::InitializeForTesting; | 70 using LayerTreeHost::InitializeForTesting; |
72 using LayerTreeHost::InitializePictureCacheForTesting; | 71 using LayerTreeHost::InitializePictureCacheForTesting; |
73 using LayerTreeHost::RecordGpuRasterizationHistogram; | 72 using LayerTreeHost::RecordGpuRasterizationHistogram; |
74 | 73 |
75 void UpdateLayers() { LayerTreeHost::UpdateLayers(); } | 74 void UpdateLayers() { LayerTreeHost::UpdateLayers(); } |
76 | 75 |
77 MicroBenchmarkController* GetMicroBenchmarkController() { | 76 MicroBenchmarkController* GetMicroBenchmarkController() { |
78 return µ_benchmark_controller_; | 77 return µ_benchmark_controller_; |
79 } | 78 } |
80 | 79 |
81 bool needs_commit() { return needs_commit_; } | 80 bool needs_commit() { return needs_commit_; } |
82 | 81 |
83 protected: | 82 protected: |
84 FakeLayerTreeHost(FakeLayerTreeHostClient* client, | 83 FakeLayerTreeHost(FakeLayerTreeHostClient* client, |
85 LayerTreeHost::InitParams* params, | 84 LayerTreeHost::InitParams* params, |
86 CompositorMode mode); | 85 CompositorMode mode); |
87 | 86 |
88 private: | 87 private: |
89 FakeImplTaskRunnerProvider task_runner_provider_; | 88 FakeImplTaskRunnerProvider task_runner_provider_; |
90 FakeLayerTreeHostClient* client_; | 89 FakeLayerTreeHostClient* client_; |
91 TestSharedBitmapManager manager_; | 90 TestSharedBitmapManager manager_; |
92 FakeLayerTreeHostImpl host_impl_; | 91 FakeLayerTreeHostImpl host_impl_; |
93 bool needs_commit_; | 92 bool needs_commit_; |
94 }; | 93 }; |
95 | 94 |
96 } // namespace cc | 95 } // namespace cc |
97 | 96 |
98 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_H_ | 97 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_H_ |
OLD | NEW |