Index: cc/layers/picture_layer_unittest.cc |
diff --git a/cc/layers/picture_layer_unittest.cc b/cc/layers/picture_layer_unittest.cc |
index c57bb61e5854d847f08096dacc3fb62ec15b7f56..8ce8b7e25f566a96b1e1b8de18e1aef6b7ca934a 100644 |
--- a/cc/layers/picture_layer_unittest.cc |
+++ b/cc/layers/picture_layer_unittest.cc |
@@ -6,6 +6,7 @@ |
#include <stddef.h> |
+#include "base/memory/ptr_util.h" |
#include "base/thread_task_runner_handle.h" |
#include "cc/layers/append_quads_data.h" |
#include "cc/layers/content_layer_client.h" |
@@ -64,10 +65,10 @@ class TestSerializationPictureLayer : public PictureLayer { |
FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); |
TestTaskGraphRunner task_graph_runner; |
LayerTreeSettings settings; |
- scoped_ptr<FakeImageSerializationProcessor> |
+ std::unique_ptr<FakeImageSerializationProcessor> |
fake_image_serialization_processor = |
- make_scoped_ptr(new FakeImageSerializationProcessor); |
- scoped_ptr<FakeLayerTreeHost> host = |
+ base::WrapUnique(new FakeImageSerializationProcessor); |
+ std::unique_ptr<FakeLayerTreeHost> host = |
FakeLayerTreeHost::Create(&host_client, &task_graph_runner, settings, |
CompositorMode::SINGLE_THREADED, |
fake_image_serialization_processor.get()); |
@@ -85,7 +86,7 @@ class TestSerializationPictureLayer : public PictureLayer { |
private: |
TestSerializationPictureLayer(ContentLayerClient* client, |
- scoped_ptr<RecordingSource> source, |
+ std::unique_ptr<RecordingSource> source, |
const gfx::Size& recording_source_viewport) |
: PictureLayer(client, std::move(source)), |
recording_source_viewport_(recording_source_viewport) {} |
@@ -102,10 +103,10 @@ TEST(PictureLayerTest, TestSetAllPropsSerializationDeserialization) { |
FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); |
TestTaskGraphRunner task_graph_runner; |
LayerTreeSettings settings; |
- scoped_ptr<FakeImageSerializationProcessor> |
+ std::unique_ptr<FakeImageSerializationProcessor> |
fake_image_serialization_processor = |
- make_scoped_ptr(new FakeImageSerializationProcessor); |
- scoped_ptr<FakeLayerTreeHost> host = |
+ base::WrapUnique(new FakeImageSerializationProcessor); |
+ std::unique_ptr<FakeLayerTreeHost> host = |
FakeLayerTreeHost::Create(&host_client, &task_graph_runner, settings, |
CompositorMode::SINGLE_THREADED, |
fake_image_serialization_processor.get()); |
@@ -133,10 +134,10 @@ TEST(PictureLayerTest, TestSetAllPropsSerializationDeserialization) { |
TEST(PictureLayerTest, TestSerializationDeserialization) { |
FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); |
TestTaskGraphRunner task_graph_runner; |
- scoped_ptr<FakeImageSerializationProcessor> |
+ std::unique_ptr<FakeImageSerializationProcessor> |
fake_image_serialization_processor = |
- make_scoped_ptr(new FakeImageSerializationProcessor); |
- scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create( |
+ base::WrapUnique(new FakeImageSerializationProcessor); |
+ std::unique_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create( |
&host_client, &task_graph_runner, LayerTreeSettings(), |
CompositorMode::SINGLE_THREADED, |
fake_image_serialization_processor.get()); |
@@ -158,7 +159,7 @@ TEST(PictureLayerTest, TestSerializationDeserialization) { |
TEST(PictureLayerTest, TestEmptySerializationDeserialization) { |
FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); |
TestTaskGraphRunner task_graph_runner; |
- scoped_ptr<FakeLayerTreeHost> host = |
+ std::unique_ptr<FakeLayerTreeHost> host = |
FakeLayerTreeHost::Create(&host_client, &task_graph_runner); |
gfx::Size recording_source_viewport(256, 256); |
@@ -175,7 +176,7 @@ TEST(PictureLayerTest, NoTilesIfEmptyBounds) { |
FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); |
TestTaskGraphRunner task_graph_runner; |
- scoped_ptr<FakeLayerTreeHost> host = |
+ std::unique_ptr<FakeLayerTreeHost> host = |
FakeLayerTreeHost::Create(&host_client, &task_graph_runner); |
host->SetRootLayer(layer); |
layer->SetIsDrawable(true); |
@@ -194,15 +195,15 @@ TEST(PictureLayerTest, NoTilesIfEmptyBounds) { |
FakeImplTaskRunnerProvider impl_task_runner_provider; |
TestSharedBitmapManager shared_bitmap_manager; |
- scoped_ptr<FakeOutputSurface> output_surface = |
+ std::unique_ptr<FakeOutputSurface> output_surface = |
FakeOutputSurface::CreateSoftware( |
- make_scoped_ptr(new SoftwareOutputDevice)); |
+ base::WrapUnique(new SoftwareOutputDevice)); |
FakeLayerTreeHostImpl host_impl(LayerTreeSettings(), |
&impl_task_runner_provider, |
&shared_bitmap_manager, &task_graph_runner); |
host_impl.InitializeRenderer(output_surface.get()); |
host_impl.CreatePendingTree(); |
- scoped_ptr<FakePictureLayerImpl> layer_impl = |
+ std::unique_ptr<FakePictureLayerImpl> layer_impl = |
FakePictureLayerImpl::Create(host_impl.pending_tree(), 1); |
layer->PushPropertiesTo(layer_impl.get()); |
@@ -221,7 +222,7 @@ TEST(PictureLayerTest, InvalidateRasterAfterUpdate) { |
FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); |
TestTaskGraphRunner task_graph_runner; |
- scoped_ptr<FakeLayerTreeHost> host = |
+ std::unique_ptr<FakeLayerTreeHost> host = |
FakeLayerTreeHost::Create(&host_client, &task_graph_runner); |
host->SetRootLayer(layer); |
layer->SetIsDrawable(true); |
@@ -236,7 +237,7 @@ TEST(PictureLayerTest, InvalidateRasterAfterUpdate) { |
host->CommitComplete(); |
FakeImplTaskRunnerProvider impl_task_runner_provider; |
TestSharedBitmapManager shared_bitmap_manager; |
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d()); |
+ std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d()); |
LayerTreeSettings layer_tree_settings = LayerTreeSettings(); |
layer_tree_settings.image_decode_tasks_enabled = true; |
FakeLayerTreeHostImpl host_impl(layer_tree_settings, |
@@ -264,7 +265,7 @@ TEST(PictureLayerTest, InvalidateRasterWithoutUpdate) { |
FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); |
TestTaskGraphRunner task_graph_runner; |
- scoped_ptr<FakeLayerTreeHost> host = |
+ std::unique_ptr<FakeLayerTreeHost> host = |
FakeLayerTreeHost::Create(&host_client, &task_graph_runner); |
host->SetRootLayer(layer); |
layer->SetIsDrawable(true); |
@@ -278,7 +279,7 @@ TEST(PictureLayerTest, InvalidateRasterWithoutUpdate) { |
host->CommitComplete(); |
FakeImplTaskRunnerProvider impl_task_runner_provider; |
TestSharedBitmapManager shared_bitmap_manager; |
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d()); |
+ std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d()); |
LayerTreeSettings layer_tree_settings = LayerTreeSettings(); |
layer_tree_settings.image_decode_tasks_enabled = true; |
FakeLayerTreeHostImpl host_impl(layer_tree_settings, |
@@ -307,7 +308,7 @@ TEST(PictureLayerTest, ClearVisibleRectWhenNoTiling) { |
FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); |
TestTaskGraphRunner task_graph_runner; |
- scoped_ptr<FakeLayerTreeHost> host = |
+ std::unique_ptr<FakeLayerTreeHost> host = |
FakeLayerTreeHost::Create(&host_client, &task_graph_runner); |
host->SetRootLayer(layer); |
layer->SetIsDrawable(true); |
@@ -324,7 +325,7 @@ TEST(PictureLayerTest, ClearVisibleRectWhenNoTiling) { |
FakeImplTaskRunnerProvider impl_task_runner_provider; |
TestSharedBitmapManager shared_bitmap_manager; |
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d()); |
+ std::unique_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d()); |
LayerTreeSettings layer_tree_settings = LayerTreeSettings(); |
layer_tree_settings.image_decode_tasks_enabled = true; |
FakeLayerTreeHostImpl host_impl(layer_tree_settings, |
@@ -367,7 +368,7 @@ TEST(PictureLayerTest, ClearVisibleRectWhenNoTiling) { |
host_impl.ActivateSyncTree(); |
- scoped_ptr<RenderPass> render_pass = RenderPass::Create(); |
+ std::unique_ptr<RenderPass> render_pass = RenderPass::Create(); |
AppendQuadsData data; |
host_impl.active_tree()->root_layer()->WillDraw(DRAW_MODE_SOFTWARE, nullptr); |
host_impl.active_tree()->root_layer()->AppendQuads(render_pass.get(), &data); |
@@ -375,7 +376,7 @@ TEST(PictureLayerTest, ClearVisibleRectWhenNoTiling) { |
} |
TEST(PictureLayerTest, SuitableForGpuRasterization) { |
- scoped_ptr<FakeRecordingSource> recording_source_owned( |
+ std::unique_ptr<FakeRecordingSource> recording_source_owned( |
new FakeRecordingSource); |
FakeRecordingSource* recording_source = recording_source_owned.get(); |
@@ -386,7 +387,7 @@ TEST(PictureLayerTest, SuitableForGpuRasterization) { |
FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); |
TestTaskGraphRunner task_graph_runner; |
- scoped_ptr<FakeLayerTreeHost> host = |
+ std::unique_ptr<FakeLayerTreeHost> host = |
FakeLayerTreeHost::Create(&host_client, &task_graph_runner); |
host->SetRootLayer(layer); |
@@ -430,13 +431,13 @@ TEST(PictureLayerTest, NonMonotonicSourceFrameNumber) { |
params.settings = &settings; |
params.task_graph_runner = &task_graph_runner; |
params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); |
- scoped_ptr<LayerTreeHost> host1 = |
+ std::unique_ptr<LayerTreeHost> host1 = |
LayerTreeHost::CreateSingleThreaded(&host_client1, ¶ms); |
host1->SetVisible(true); |
host_client1.SetLayerTreeHost(host1.get()); |
params.client = &host_client2; |
- scoped_ptr<LayerTreeHost> host2 = |
+ std::unique_ptr<LayerTreeHost> host2 = |
LayerTreeHost::CreateSingleThreaded(&host_client2, ¶ms); |
host2->SetVisible(true); |
host_client2.SetLayerTreeHost(host2.get()); |