Chromium Code Reviews| Index: cc/test/fake_layer_tree_host.cc |
| diff --git a/cc/test/fake_layer_tree_host.cc b/cc/test/fake_layer_tree_host.cc |
| index 143d22ea0c8413ec8cd100e39a276c4b48d79a57..e6688c7f221cce9e046ff6a70c92267a5cf46b79 100644 |
| --- a/cc/test/fake_layer_tree_host.cc |
| +++ b/cc/test/fake_layer_tree_host.cc |
| @@ -6,10 +6,13 @@ |
| namespace cc { |
| FakeLayerTreeHost::FakeLayerTreeHost(FakeLayerTreeHostClient* client, |
| - const LayerTreeSettings& settings) |
| - : LayerTreeHost(client, NULL, NULL, NULL, settings), |
| + LayerTreeHost::InitParams* params) |
| + : LayerTreeHost(params), |
| client_(client), |
| - host_impl_(settings, &proxy_, &manager_, nullptr), |
| + host_impl_(params->settings ? *params->settings : LayerTreeSettings(), |
|
danakj
2015/05/07 00:59:56
not a fan, this is a bit unobvious. i'd rather the
sadrul
2015/05/07 04:39:25
Removed the NULL check (and kept settings as a ptr
|
| + &proxy_, |
| + &manager_, |
| + nullptr), |
| needs_commit_(false) { |
| client_->SetLayerTreeHost(this); |
| } |
| @@ -18,13 +21,16 @@ scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( |
| FakeLayerTreeHostClient* client) { |
| LayerTreeSettings settings; |
| settings.verify_property_trees = true; |
| - return make_scoped_ptr(new FakeLayerTreeHost(client, settings)); |
| + return Create(client, settings); |
| } |
| scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( |
| FakeLayerTreeHostClient* client, |
| const LayerTreeSettings& settings) { |
| - return make_scoped_ptr(new FakeLayerTreeHost(client, settings)); |
| + LayerTreeHost::InitParams params; |
| + params.client = client; |
| + params.settings = &settings; |
| + return make_scoped_ptr(new FakeLayerTreeHost(client, ¶ms)); |
| } |
| FakeLayerTreeHost::~FakeLayerTreeHost() { |