| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 using LayerTreeHostInProcess::RecordGpuRasterizationHistogram; | 81 using LayerTreeHostInProcess::RecordGpuRasterizationHistogram; |
| 82 using LayerTreeHostInProcess::SetUIResourceManagerForTesting; | 82 using LayerTreeHostInProcess::SetUIResourceManagerForTesting; |
| 83 | 83 |
| 84 void UpdateLayers() { LayerTreeHostInProcess::UpdateLayers(); } | 84 void UpdateLayers() { LayerTreeHostInProcess::UpdateLayers(); } |
| 85 | 85 |
| 86 MicroBenchmarkController* GetMicroBenchmarkController() { | 86 MicroBenchmarkController* GetMicroBenchmarkController() { |
| 87 return µ_benchmark_controller_; | 87 return µ_benchmark_controller_; |
| 88 } | 88 } |
| 89 | 89 |
| 90 bool needs_commit() { return needs_commit_; } | 90 bool needs_commit() { return needs_commit_; } |
| 91 void reset_needs_commit() { needs_commit_ = false; } |
| 91 | 92 |
| 92 FakeLayerTreeHost(FakeLayerTreeHostClient* client, | 93 FakeLayerTreeHost(FakeLayerTreeHostClient* client, |
| 93 LayerTreeHostInProcess::InitParams* params, | 94 LayerTreeHostInProcess::InitParams* params, |
| 94 CompositorMode mode); | 95 CompositorMode mode); |
| 95 | 96 |
| 96 private: | 97 private: |
| 97 FakeImplTaskRunnerProvider task_runner_provider_; | 98 FakeImplTaskRunnerProvider task_runner_provider_; |
| 98 FakeLayerTreeHostClient* client_; | 99 FakeLayerTreeHostClient* client_; |
| 99 FakeLayerTreeHostImpl host_impl_; | 100 FakeLayerTreeHostImpl host_impl_; |
| 100 bool needs_commit_; | 101 bool needs_commit_; |
| 101 }; | 102 }; |
| 102 | 103 |
| 103 } // namespace cc | 104 } // namespace cc |
| 104 | 105 |
| 105 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_H_ | 106 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_H_ |
| OLD | NEW |