Index: cc/trees/layer_tree_host_unittest.cc |
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc |
index b9d8bc9d12c7ddeb1ee1d385fcad194d2b88ca59..8116ce3ffa5f9471546700e090621b4bbd11306f 100644 |
--- a/cc/trees/layer_tree_host_unittest.cc |
+++ b/cc/trees/layer_tree_host_unittest.cc |
@@ -2336,9 +2336,9 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestDeferCommits); |
class LayerTreeHostWithProxy : public LayerTreeHost { |
public: |
LayerTreeHostWithProxy(FakeLayerTreeHostClient* client, |
- const LayerTreeSettings& settings, |
- scoped_ptr<FakeProxy> proxy) |
- : LayerTreeHost(client, NULL, NULL, NULL, settings) { |
+ scoped_ptr<FakeProxy> proxy, |
+ LayerTreeHost::InitParams* params) |
+ : LayerTreeHost(params) { |
proxy->SetLayerTreeHost(this); |
client->SetLayerTreeHost(this); |
InitializeForTesting(proxy.Pass()); |
@@ -2358,7 +2358,10 @@ TEST(LayerTreeHostTest, LimitPartialUpdates) { |
settings.impl_side_painting = false; |
settings.max_partial_texture_updates = 10; |
- LayerTreeHostWithProxy host(&client, settings, proxy.Pass()); |
+ LayerTreeHost::InitParams params; |
+ params.client = &client; |
+ params.settings = &settings; |
+ LayerTreeHostWithProxy host(&client, proxy.Pass(), ¶ms); |
EXPECT_EQ(0u, host.MaxPartialTextureUpdates()); |
} |
@@ -2376,7 +2379,10 @@ TEST(LayerTreeHostTest, LimitPartialUpdates) { |
settings.impl_side_painting = false; |
settings.max_partial_texture_updates = 10; |
- LayerTreeHostWithProxy host(&client, settings, proxy.Pass()); |
+ LayerTreeHost::InitParams params; |
+ params.client = &client; |
+ params.settings = &settings; |
+ LayerTreeHostWithProxy host(&client, proxy.Pass(), ¶ms); |
EXPECT_EQ(5u, host.MaxPartialTextureUpdates()); |
} |
@@ -2394,7 +2400,10 @@ TEST(LayerTreeHostTest, LimitPartialUpdates) { |
settings.impl_side_painting = false; |
settings.max_partial_texture_updates = 10; |
- LayerTreeHostWithProxy host(&client, settings, proxy.Pass()); |
+ LayerTreeHost::InitParams params; |
+ params.client = &client; |
+ params.settings = &settings; |
+ LayerTreeHostWithProxy host(&client, proxy.Pass(), ¶ms); |
EXPECT_EQ(10u, host.MaxPartialTextureUpdates()); |
} |
@@ -2410,9 +2419,13 @@ TEST(LayerTreeHostTest, PartialUpdatesWithGLRenderer) { |
scoped_ptr<SharedBitmapManager> shared_bitmap_manager( |
new TestSharedBitmapManager()); |
- scoped_ptr<LayerTreeHost> host = LayerTreeHost::CreateSingleThreaded( |
- &client, &client, shared_bitmap_manager.get(), NULL, NULL, settings, |
- base::ThreadTaskRunnerHandle::Get(), nullptr); |
+ LayerTreeHost::InitParams params; |
+ params.client = &client; |
+ params.shared_bitmap_manager = shared_bitmap_manager.get(); |
+ params.settings = &settings; |
+ params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); |
+ scoped_ptr<LayerTreeHost> host = |
+ LayerTreeHost::CreateSingleThreaded(&client, ¶ms); |
client.SetLayerTreeHost(host.get()); |
host->Composite(base::TimeTicks::Now()); |
@@ -2429,9 +2442,13 @@ TEST(LayerTreeHostTest, PartialUpdatesWithSoftwareRenderer) { |
scoped_ptr<SharedBitmapManager> shared_bitmap_manager( |
new TestSharedBitmapManager()); |
- scoped_ptr<LayerTreeHost> host = LayerTreeHost::CreateSingleThreaded( |
- &client, &client, shared_bitmap_manager.get(), NULL, NULL, settings, |
- base::ThreadTaskRunnerHandle::Get(), nullptr); |
+ LayerTreeHost::InitParams params; |
+ params.client = &client; |
+ params.shared_bitmap_manager = shared_bitmap_manager.get(); |
+ params.settings = &settings; |
+ params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); |
+ scoped_ptr<LayerTreeHost> host = |
+ LayerTreeHost::CreateSingleThreaded(&client, ¶ms); |
client.SetLayerTreeHost(host.get()); |
host->Composite(base::TimeTicks::Now()); |
@@ -2448,9 +2465,13 @@ TEST(LayerTreeHostTest, PartialUpdatesWithDelegatingRendererAndGLContent) { |
scoped_ptr<SharedBitmapManager> shared_bitmap_manager( |
new TestSharedBitmapManager()); |
- scoped_ptr<LayerTreeHost> host = LayerTreeHost::CreateSingleThreaded( |
- &client, &client, shared_bitmap_manager.get(), NULL, NULL, settings, |
- base::ThreadTaskRunnerHandle::Get(), nullptr); |
+ LayerTreeHost::InitParams params; |
+ params.client = &client; |
+ params.shared_bitmap_manager = shared_bitmap_manager.get(); |
+ params.settings = &settings; |
+ params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); |
+ scoped_ptr<LayerTreeHost> host = |
+ LayerTreeHost::CreateSingleThreaded(&client, ¶ms); |
client.SetLayerTreeHost(host.get()); |
host->Composite(base::TimeTicks::Now()); |
@@ -2468,9 +2489,13 @@ TEST(LayerTreeHostTest, |
scoped_ptr<SharedBitmapManager> shared_bitmap_manager( |
new TestSharedBitmapManager()); |
- scoped_ptr<LayerTreeHost> host = LayerTreeHost::CreateSingleThreaded( |
- &client, &client, shared_bitmap_manager.get(), NULL, NULL, settings, |
- base::ThreadTaskRunnerHandle::Get(), nullptr); |
+ LayerTreeHost::InitParams params; |
+ params.client = &client; |
+ params.shared_bitmap_manager = shared_bitmap_manager.get(); |
+ params.settings = &settings; |
+ params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); |
+ scoped_ptr<LayerTreeHost> host = |
+ LayerTreeHost::CreateSingleThreaded(&client, ¶ms); |
client.SetLayerTreeHost(host.get()); |
host->Composite(base::TimeTicks::Now()); |