Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: cc/test/fake_layer_tree_host.h

Issue 2650303002: cc: Remove the LayerTreeHost abstraction. (Closed)
Patch Set: missed ui Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/surfaces/surface_reference_owner.h ('k') | cc/test/fake_layer_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "cc/test/fake_layer_tree_host_impl.h" 11 #include "cc/test/fake_layer_tree_host_impl.h"
12 #include "cc/trees/layer_tree_host_in_process.h" 12 #include "cc/trees/layer_tree_host.h"
13 #include "cc/trees/layer_tree_impl.h" 13 #include "cc/trees/layer_tree_impl.h"
14 #include "cc/trees/tree_synchronizer.h" 14 #include "cc/trees/tree_synchronizer.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class MutatorHost; 18 class MutatorHost;
19 class TestTaskGraphRunner; 19 class TestTaskGraphRunner;
20 20
21 class FakeLayerTreeHost : public LayerTreeHostInProcess { 21 class FakeLayerTreeHost : public LayerTreeHost {
22 public: 22 public:
23 static std::unique_ptr<FakeLayerTreeHost> Create( 23 static std::unique_ptr<FakeLayerTreeHost> Create(
24 FakeLayerTreeHostClient* client, 24 FakeLayerTreeHostClient* client,
25 TestTaskGraphRunner* task_graph_runner, 25 TestTaskGraphRunner* task_graph_runner,
26 MutatorHost* mutator_host); 26 MutatorHost* mutator_host);
27 static std::unique_ptr<FakeLayerTreeHost> Create( 27 static std::unique_ptr<FakeLayerTreeHost> Create(
28 FakeLayerTreeHostClient* client, 28 FakeLayerTreeHostClient* client,
29 TestTaskGraphRunner* task_graph_runner, 29 TestTaskGraphRunner* task_graph_runner,
30 MutatorHost* mutator_host, 30 MutatorHost* mutator_host,
31 const LayerTreeSettings& settings); 31 const LayerTreeSettings& settings);
(...skipping 26 matching lines...) Expand all
58 layer_tree_->BuildPropertyTreesForTesting(); 58 layer_tree_->BuildPropertyTreesForTesting();
59 } 59 }
60 60
61 LayerImpl* CommitAndCreateLayerImplTree(); 61 LayerImpl* CommitAndCreateLayerImplTree();
62 LayerImpl* CommitAndCreatePendingTree(); 62 LayerImpl* CommitAndCreatePendingTree();
63 63
64 FakeLayerTreeHostImpl* host_impl() { return &host_impl_; } 64 FakeLayerTreeHostImpl* host_impl() { return &host_impl_; }
65 LayerTreeImpl* active_tree() { return host_impl_.active_tree(); } 65 LayerTreeImpl* active_tree() { return host_impl_.active_tree(); }
66 LayerTreeImpl* pending_tree() { return host_impl_.pending_tree(); } 66 LayerTreeImpl* pending_tree() { return host_impl_.pending_tree(); }
67 67
68 using LayerTreeHostInProcess::ScheduleMicroBenchmark; 68 using LayerTreeHost::ScheduleMicroBenchmark;
69 using LayerTreeHostInProcess::SendMessageToMicroBenchmark; 69 using LayerTreeHost::SendMessageToMicroBenchmark;
70 using LayerTreeHostInProcess::InitializeSingleThreaded; 70 using LayerTreeHost::InitializeSingleThreaded;
71 using LayerTreeHostInProcess::InitializeForTesting; 71 using LayerTreeHost::InitializeForTesting;
72 using LayerTreeHostInProcess::RecordGpuRasterizationHistogram; 72 using LayerTreeHost::RecordGpuRasterizationHistogram;
73 using LayerTreeHostInProcess::SetUIResourceManagerForTesting; 73 using LayerTreeHost::SetUIResourceManagerForTesting;
74 74
75 void UpdateLayers() { LayerTreeHostInProcess::UpdateLayers(); } 75 void UpdateLayers() { LayerTreeHost::UpdateLayers(); }
76 76
77 MicroBenchmarkController* GetMicroBenchmarkController() { 77 MicroBenchmarkController* GetMicroBenchmarkController() {
78 return &micro_benchmark_controller_; 78 return &micro_benchmark_controller_;
79 } 79 }
80 80
81 bool needs_commit() { return needs_commit_; } 81 bool needs_commit() { return needs_commit_; }
82 void reset_needs_commit() { needs_commit_ = false; } 82 void reset_needs_commit() { needs_commit_ = false; }
83 83
84 FakeLayerTreeHost(FakeLayerTreeHostClient* client, 84 FakeLayerTreeHost(FakeLayerTreeHostClient* client,
85 LayerTreeHostInProcess::InitParams* params, 85 LayerTreeHost::InitParams* params,
86 CompositorMode mode); 86 CompositorMode mode);
87 87
88 private: 88 private:
89 FakeImplTaskRunnerProvider task_runner_provider_; 89 FakeImplTaskRunnerProvider task_runner_provider_;
90 FakeLayerTreeHostClient* client_; 90 FakeLayerTreeHostClient* client_;
91 FakeLayerTreeHostImpl host_impl_; 91 FakeLayerTreeHostImpl host_impl_;
92 bool needs_commit_; 92 bool needs_commit_;
93 }; 93 };
94 94
95 } // namespace cc 95 } // namespace cc
96 96
97 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_H_ 97 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_reference_owner.h ('k') | cc/test/fake_layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698