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

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

Issue 202763002: Switch to use SharedBitmapManager all the time in cc_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/fake_layer_tree_host.h ('k') | cc/test/fake_layer_tree_host_impl.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 namespace cc { 7 namespace cc {
8 FakeLayerTreeHost::FakeLayerTreeHost(LayerTreeHostClient* client,
9 const LayerTreeSettings& settings)
10 : LayerTreeHost(client, NULL, settings),
11 host_impl_(settings, &proxy_, &manager_),
12 needs_commit_(false) {}
8 13
9 scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create() { 14 scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create() {
10 static FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); 15 static FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
11 static LayerTreeSettings settings; 16 static LayerTreeSettings settings;
12 return make_scoped_ptr(new FakeLayerTreeHost(&client, settings)); 17 return make_scoped_ptr(new FakeLayerTreeHost(&client, settings));
13 } 18 }
14 19
15 scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( 20 scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create(
16 const LayerTreeSettings& settings) { 21 const LayerTreeSettings& settings) {
17 static FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); 22 static FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
18 return make_scoped_ptr(new FakeLayerTreeHost(&client, settings)); 23 return make_scoped_ptr(new FakeLayerTreeHost(&client, settings));
19 } 24 }
20 25
21 void FakeLayerTreeHost::SetNeedsCommit() { needs_commit_ = true; } 26 void FakeLayerTreeHost::SetNeedsCommit() { needs_commit_ = true; }
22 27
23 LayerImpl* FakeLayerTreeHost::CommitAndCreateLayerImplTree() { 28 LayerImpl* FakeLayerTreeHost::CommitAndCreateLayerImplTree() {
24 scoped_ptr<LayerImpl> old_root_layer_impl = active_tree()->DetachLayerTree(); 29 scoped_ptr<LayerImpl> old_root_layer_impl = active_tree()->DetachLayerTree();
25 30
26 scoped_ptr<LayerImpl> layer_impl = TreeSynchronizer::SynchronizeTrees( 31 scoped_ptr<LayerImpl> layer_impl = TreeSynchronizer::SynchronizeTrees(
27 root_layer(), old_root_layer_impl.Pass(), active_tree()); 32 root_layer(), old_root_layer_impl.Pass(), active_tree());
28 TreeSynchronizer::PushProperties(root_layer(), layer_impl.get()); 33 TreeSynchronizer::PushProperties(root_layer(), layer_impl.get());
29 34
30 active_tree()->SetRootLayer(layer_impl.Pass()); 35 active_tree()->SetRootLayer(layer_impl.Pass());
31 return active_tree()->root_layer(); 36 return active_tree()->root_layer();
32 } 37 }
33 38
34 } // namespace cc 39 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host.h ('k') | cc/test/fake_layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698