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

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

Issue 2661523003: cc: Merge LayerTree into the LayerTreeHost. (Closed)
Patch Set: auto Created 3 years, 10 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/output/bsp_tree_perftest.cc ('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"
(...skipping 28 matching lines...) Expand all
39 FakeLayerTreeHostClient* client, 39 FakeLayerTreeHostClient* client,
40 TestTaskGraphRunner* task_graph_runner, 40 TestTaskGraphRunner* task_graph_runner,
41 MutatorHost* mutator_host, 41 MutatorHost* mutator_host,
42 const LayerTreeSettings& settings, 42 const LayerTreeSettings& settings,
43 CompositorMode mode, 43 CompositorMode mode,
44 InitParams params); 44 InitParams params);
45 ~FakeLayerTreeHost() override; 45 ~FakeLayerTreeHost() override;
46 46
47 void SetNeedsCommit() override; 47 void SetNeedsCommit() override;
48 void SetNeedsUpdateLayers() override {} 48 void SetNeedsUpdateLayers() override {}
49 49 void SetNeedsFullTreeSync() override {}
50 void SetRootLayer(scoped_refptr<Layer> root_layer) {
51 layer_tree_->SetRootLayer(root_layer);
52 }
53 Layer* root_layer() const { return layer_tree_->root_layer(); }
54 PropertyTrees* property_trees() const {
55 return layer_tree_->property_trees();
56 }
57 void BuildPropertyTreesForTesting() {
58 layer_tree_->BuildPropertyTreesForTesting();
59 }
60 50
61 LayerImpl* CommitAndCreateLayerImplTree(); 51 LayerImpl* CommitAndCreateLayerImplTree();
62 LayerImpl* CommitAndCreatePendingTree(); 52 LayerImpl* CommitAndCreatePendingTree();
63 53
64 FakeLayerTreeHostImpl* host_impl() { return &host_impl_; } 54 FakeLayerTreeHostImpl* host_impl() { return &host_impl_; }
65 LayerTreeImpl* active_tree() { return host_impl_.active_tree(); } 55 LayerTreeImpl* active_tree() { return host_impl_.active_tree(); }
66 LayerTreeImpl* pending_tree() { return host_impl_.pending_tree(); } 56 LayerTreeImpl* pending_tree() { return host_impl_.pending_tree(); }
67 57
68 using LayerTreeHost::ScheduleMicroBenchmark; 58 using LayerTreeHost::ScheduleMicroBenchmark;
69 using LayerTreeHost::SendMessageToMicroBenchmark; 59 using LayerTreeHost::SendMessageToMicroBenchmark;
(...skipping 18 matching lines...) Expand all
88 private: 78 private:
89 FakeImplTaskRunnerProvider task_runner_provider_; 79 FakeImplTaskRunnerProvider task_runner_provider_;
90 FakeLayerTreeHostClient* client_; 80 FakeLayerTreeHostClient* client_;
91 FakeLayerTreeHostImpl host_impl_; 81 FakeLayerTreeHostImpl host_impl_;
92 bool needs_commit_; 82 bool needs_commit_;
93 }; 83 };
94 84
95 } // namespace cc 85 } // namespace cc
96 86
97 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_H_ 87 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/output/bsp_tree_perftest.cc ('k') | cc/test/fake_layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698