| Index: cc/layers/picture_layer_unittest.cc
|
| diff --git a/cc/layers/picture_layer_unittest.cc b/cc/layers/picture_layer_unittest.cc
|
| index 4e6946b1563d6e78cdf71abcb6cf78283028853d..4faaf202f004390b047e8e88ed132cf16aa21720 100644
|
| --- a/cc/layers/picture_layer_unittest.cc
|
| +++ b/cc/layers/picture_layer_unittest.cc
|
| @@ -13,6 +13,8 @@
|
| #include "cc/test/fake_picture_layer_impl.h"
|
| #include "cc/test/fake_proxy.h"
|
| #include "cc/test/impl_side_painting_settings.h"
|
| +#include "cc/test/test_shared_bitmap_manager.h"
|
| +#include "cc/test/test_task_graph_runner.h"
|
| #include "cc/trees/single_thread_proxy.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| @@ -40,7 +42,9 @@ TEST(PictureLayerTest, NoTilesIfEmptyBounds) {
|
| layer->SetBounds(gfx::Size(10, 10));
|
|
|
| FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&host_client);
|
| + TestTaskGraphRunner task_graph_runner;
|
| + scoped_ptr<FakeLayerTreeHost> host =
|
| + FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
|
| host->SetRootLayer(layer);
|
| layer->SetIsDrawable(true);
|
| layer->SavePaintProperties();
|
| @@ -63,7 +67,7 @@ TEST(PictureLayerTest, NoTilesIfEmptyBounds) {
|
|
|
| TestSharedBitmapManager shared_bitmap_manager;
|
| FakeLayerTreeHostImpl host_impl(ImplSidePaintingSettings(), &proxy,
|
| - &shared_bitmap_manager, nullptr);
|
| + &shared_bitmap_manager, &task_graph_runner);
|
| host_impl.CreatePendingTree();
|
| scoped_ptr<FakePictureLayerImpl> layer_impl =
|
| FakePictureLayerImpl::Create(host_impl.pending_tree(), 1);
|
| @@ -81,7 +85,9 @@ TEST(PictureLayerTest, SuitableForGpuRasterization) {
|
| scoped_refptr<PictureLayer> layer =
|
| PictureLayer::Create(LayerSettings(), &client);
|
| FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
|
| - scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&host_client);
|
| + TestTaskGraphRunner task_graph_runner;
|
| + scoped_ptr<FakeLayerTreeHost> host =
|
| + FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
|
| host->SetRootLayer(layer);
|
| RecordingSource* recording_source = layer->GetRecordingSourceForTesting();
|
|
|
| @@ -103,8 +109,9 @@ TEST(PictureLayerTest, UseTileGridSize) {
|
| scoped_refptr<PictureLayer> layer =
|
| PictureLayer::Create(LayerSettings(), &client);
|
| FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
|
| + TestTaskGraphRunner task_graph_runner;
|
| scoped_ptr<FakeLayerTreeHost> host =
|
| - FakeLayerTreeHost::Create(&host_client, settings);
|
| + FakeLayerTreeHost::Create(&host_client, &task_graph_runner, settings);
|
| host->SetRootLayer(layer);
|
|
|
| // Tile-grid is set according to its setting.
|
| @@ -121,11 +128,13 @@ TEST(PictureLayerTest, UseTileGridSize) {
|
| TEST(PictureLayerTest, NonMonotonicSourceFrameNumber) {
|
| LayerTreeSettings settings;
|
| settings.single_thread_proxy_scheduler = false;
|
| + settings.use_zero_copy = true;
|
| + settings.use_one_copy = false;
|
|
|
| FakeLayerTreeHostClient host_client1(FakeLayerTreeHostClient::DIRECT_3D);
|
| FakeLayerTreeHostClient host_client2(FakeLayerTreeHostClient::DIRECT_3D);
|
| - scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
|
| - new TestSharedBitmapManager());
|
| + TestSharedBitmapManager shared_bitmap_manager;
|
| + TestTaskGraphRunner task_graph_runner;
|
|
|
| MockContentLayerClient client;
|
| scoped_refptr<FakePictureLayer> layer =
|
| @@ -133,8 +142,9 @@ TEST(PictureLayerTest, NonMonotonicSourceFrameNumber) {
|
|
|
| LayerTreeHost::InitParams params;
|
| params.client = &host_client1;
|
| - params.shared_bitmap_manager = shared_bitmap_manager.get();
|
| + params.shared_bitmap_manager = &shared_bitmap_manager;
|
| params.settings = &settings;
|
| + params.task_graph_runner = &task_graph_runner;
|
| params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
|
| scoped_ptr<LayerTreeHost> host1 =
|
| LayerTreeHost::CreateSingleThreaded(&host_client1, ¶ms);
|
|
|