| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 void SetNeedsCommit() override; | 49 void SetNeedsCommit() override; |
| 50 void SetNeedsUpdateLayers() override {} | 50 void SetNeedsUpdateLayers() override {} |
| 51 | 51 |
| 52 void SetRootLayer(scoped_refptr<Layer> root_layer) { | 52 void SetRootLayer(scoped_refptr<Layer> root_layer) { |
| 53 layer_tree_->SetRootLayer(root_layer); | 53 layer_tree_->SetRootLayer(root_layer); |
| 54 } | 54 } |
| 55 Layer* root_layer() const { return layer_tree_->root_layer(); } | 55 Layer* root_layer() const { return layer_tree_->root_layer(); } |
| 56 PropertyTrees* property_trees() const { | 56 PropertyTrees* property_trees() const { |
| 57 return layer_tree_->property_trees(); | 57 return layer_tree_->property_trees(); |
| 58 } | 58 } |
| 59 void BuildPropertyTreesForTesting() { |
| 60 layer_tree_->BuildPropertyTreesForTesting(); |
| 61 } |
| 59 | 62 |
| 60 LayerImpl* CommitAndCreateLayerImplTree(); | 63 LayerImpl* CommitAndCreateLayerImplTree(); |
| 61 LayerImpl* CommitAndCreatePendingTree(); | 64 LayerImpl* CommitAndCreatePendingTree(); |
| 62 | 65 |
| 63 FakeLayerTreeHostImpl* host_impl() { return &host_impl_; } | 66 FakeLayerTreeHostImpl* host_impl() { return &host_impl_; } |
| 64 LayerTreeImpl* active_tree() { return host_impl_.active_tree(); } | 67 LayerTreeImpl* active_tree() { return host_impl_.active_tree(); } |
| 65 LayerTreeImpl* pending_tree() { return host_impl_.pending_tree(); } | 68 LayerTreeImpl* pending_tree() { return host_impl_.pending_tree(); } |
| 66 | 69 |
| 67 using LayerTreeHost::ScheduleMicroBenchmark; | 70 using LayerTreeHost::ScheduleMicroBenchmark; |
| 68 using LayerTreeHost::SendMessageToMicroBenchmark; | 71 using LayerTreeHost::SendMessageToMicroBenchmark; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 88 FakeImplTaskRunnerProvider task_runner_provider_; | 91 FakeImplTaskRunnerProvider task_runner_provider_; |
| 89 FakeLayerTreeHostClient* client_; | 92 FakeLayerTreeHostClient* client_; |
| 90 TestSharedBitmapManager manager_; | 93 TestSharedBitmapManager manager_; |
| 91 FakeLayerTreeHostImpl host_impl_; | 94 FakeLayerTreeHostImpl host_impl_; |
| 92 bool needs_commit_; | 95 bool needs_commit_; |
| 93 }; | 96 }; |
| 94 | 97 |
| 95 } // namespace cc | 98 } // namespace cc |
| 96 | 99 |
| 97 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_H_ | 100 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_H_ |
| OLD | NEW |