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

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

Issue 2646623002: cc: Remove all blimp code from cc. (Closed)
Patch Set: test build 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/test/fake_layer_tree_host.h ('k') | cc/test/fake_picture_layer.h » ('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 #include "cc/test/fake_layer_tree_host.h" 5 #include "cc/test/fake_layer_tree_host.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "cc/animation/animation_host.h" 9 #include "cc/animation/animation_host.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
11 #include "cc/test/fake_image_serialization_processor.h"
12 #include "cc/test/test_task_graph_runner.h" 11 #include "cc/test/test_task_graph_runner.h"
13 #include "cc/trees/layer_tree.h" 12 #include "cc/trees/layer_tree.h"
14 #include "cc/trees/mutator_host.h" 13 #include "cc/trees/mutator_host.h"
15 14
16 namespace cc { 15 namespace cc {
17 16
18 namespace { 17 namespace {
19 18
20 class FakeLayerTree : public LayerTree { 19 class FakeLayerTree : public LayerTree {
21 public: 20 public:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const LayerTreeSettings& settings, 71 const LayerTreeSettings& settings,
73 CompositorMode mode) { 72 CompositorMode mode) {
74 LayerTreeHostInProcess::InitParams params; 73 LayerTreeHostInProcess::InitParams params;
75 params.client = client; 74 params.client = client;
76 params.settings = &settings; 75 params.settings = &settings;
77 params.task_graph_runner = task_graph_runner; 76 params.task_graph_runner = task_graph_runner;
78 params.mutator_host = mutator_host; 77 params.mutator_host = mutator_host;
79 return base::WrapUnique(new FakeLayerTreeHost(client, &params, mode)); 78 return base::WrapUnique(new FakeLayerTreeHost(client, &params, mode));
80 } 79 }
81 80
82 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create(
83 FakeLayerTreeHostClient* client,
84 TestTaskGraphRunner* task_graph_runner,
85 MutatorHost* mutator_host,
86 const LayerTreeSettings& settings,
87 CompositorMode mode,
88 ImageSerializationProcessor* image_serialization_processor) {
89 LayerTreeHostInProcess::InitParams params;
90 params.client = client;
91 params.settings = &settings;
92 params.task_graph_runner = task_graph_runner;
93 params.image_serialization_processor = image_serialization_processor;
94 params.mutator_host = mutator_host;
95 return base::WrapUnique(new FakeLayerTreeHost(client, &params, mode));
96 }
97
98 FakeLayerTreeHost::~FakeLayerTreeHost() { 81 FakeLayerTreeHost::~FakeLayerTreeHost() {
99 client_->SetLayerTreeHost(NULL); 82 client_->SetLayerTreeHost(NULL);
100 } 83 }
101 84
102 void FakeLayerTreeHost::SetNeedsCommit() { needs_commit_ = true; } 85 void FakeLayerTreeHost::SetNeedsCommit() { needs_commit_ = true; }
103 86
104 LayerImpl* FakeLayerTreeHost::CommitAndCreateLayerImplTree() { 87 LayerImpl* FakeLayerTreeHost::CommitAndCreateLayerImplTree() {
105 TreeSynchronizer::SynchronizeTrees(root_layer(), active_tree()); 88 TreeSynchronizer::SynchronizeTrees(root_layer(), active_tree());
106 active_tree()->SetPropertyTrees(property_trees()); 89 active_tree()->SetPropertyTrees(property_trees());
107 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), 90 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(),
(...skipping 26 matching lines...) Expand all
134 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), 117 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(),
135 pending_tree()); 118 pending_tree());
136 layer_tree_->mutator_host()->PushPropertiesTo(host_impl_.mutator_host()); 119 layer_tree_->mutator_host()->PushPropertiesTo(host_impl_.mutator_host());
137 120
138 pending_tree()->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread( 121 pending_tree()->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread(
139 property_trees(), pending_tree()); 122 property_trees(), pending_tree());
140 return pending_tree()->root_layer_for_testing(); 123 return pending_tree()->root_layer_for_testing();
141 } 124 }
142 125
143 } // namespace cc 126 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host.h ('k') | cc/test/fake_picture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698