diff options
Diffstat (limited to 'cc')
41 files changed, 138 insertions, 136 deletions
diff --git a/cc/playback/compositing_display_item.cc b/cc/playback/compositing_display_item.cc index 2489d3c..8095572 100644 --- a/cc/playback/compositing_display_item.cc +++ b/cc/playback/compositing_display_item.cc @@ -79,7 +79,7 @@ void CompositingDisplayItem::FromProtobuf(const proto::DisplayItem& proto) { filter = skia::AdoptRef(static_cast<SkColorFilter*>(flattenable)); } - SetNew(alpha, xfermode, bounds.get(), filter.Pass()); + SetNew(alpha, xfermode, bounds.get(), std::move(filter)); } void CompositingDisplayItem::Raster( diff --git a/cc/playback/display_item_list_unittest.cc b/cc/playback/display_item_list_unittest.cc index cb19e39..c62dce3 100644 --- a/cc/playback/display_item_list_unittest.cc +++ b/cc/playback/display_item_list_unittest.cc @@ -333,7 +333,7 @@ TEST(DisplayItemListTest, ClipItem) { canvas->drawRectCoords(0.f, 0.f, 60.f, 60.f, red_paint); picture = skia::AdoptRef(recorder.endRecordingAsPicture()); auto* item1 = list->CreateAndAppendItem<DrawingDisplayItem>(); - item1->SetNew(picture.Pass()); + item1->SetNew(std::move(picture)); gfx::Rect clip_rect(60, 60, 10, 10); auto* item2 = list->CreateAndAppendItem<ClipDisplayItem>(); @@ -348,7 +348,7 @@ TEST(DisplayItemListTest, ClipItem) { canvas->drawRectCoords(50.f, 50.f, 75.f, 75.f, blue_paint); picture = skia::AdoptRef(recorder.endRecordingAsPicture()); auto* item3 = list->CreateAndAppendItem<DrawingDisplayItem>(); - item3->SetNew(picture.Pass()); + item3->SetNew(std::move(picture)); list->CreateAndAppendItem<EndClipDisplayItem>(); list->Finalize(); diff --git a/cc/playback/display_list_recording_source_unittest.cc b/cc/playback/display_list_recording_source_unittest.cc index 98f827b..cb9b573 100644 --- a/cc/playback/display_list_recording_source_unittest.cc +++ b/cc/playback/display_list_recording_source_unittest.cc @@ -20,7 +20,7 @@ scoped_ptr<FakeDisplayListRecordingSource> CreateRecordingSource( scoped_ptr<FakeDisplayListRecordingSource> recording_source = FakeDisplayListRecordingSource::CreateRecordingSource(viewport, layer_rect.size()); - return recording_source.Pass(); + return recording_source; } scoped_refptr<DisplayListRasterSource> CreateRasterSource( diff --git a/cc/playback/drawing_display_item.cc b/cc/playback/drawing_display_item.cc index cee9c1d..e43ad72 100644 --- a/cc/playback/drawing_display_item.cc +++ b/cc/playback/drawing_display_item.cc @@ -28,7 +28,7 @@ DrawingDisplayItem::~DrawingDisplayItem() { } void DrawingDisplayItem::SetNew(skia::RefPtr<SkPicture> picture) { - picture_ = picture.Pass(); + picture_ = std::move(picture); DisplayItem::SetNew(picture_->suitableForGpuRasterization(NULL), picture_->approximateOpCount(), SkPictureUtils::ApproximateBytesUsed(picture_.get())); @@ -65,7 +65,7 @@ void DrawingDisplayItem::FromProtobuf(const proto::DisplayItem& proto) { picture = skia::AdoptRef(SkPicture::CreateFromStream(&stream, nullptr)); } - SetNew(picture.Pass()); + SetNew(std::move(picture)); } void DrawingDisplayItem::Raster(SkCanvas* canvas, diff --git a/cc/raster/one_copy_tile_task_worker_pool.cc b/cc/raster/one_copy_tile_task_worker_pool.cc index dc1d118..c66c2ad 100644 --- a/cc/raster/one_copy_tile_task_worker_pool.cc +++ b/cc/raster/one_copy_tile_task_worker_pool.cc @@ -530,7 +530,7 @@ void OneCopyTileTaskWorkerPool::PlaybackAndCopyOnWorkerThread( } staging_buffer->last_usage = base::TimeTicks::Now(); - busy_buffers_.push_back(staging_buffer.Pass()); + busy_buffers_.push_back(std::move(staging_buffer)); ScheduleReduceMemoryUsage(); } @@ -693,7 +693,7 @@ OneCopyTileTaskWorkerPool::AcquireStagingBuffer(const Resource* resource, free_buffers_.pop_front(); } - return staging_buffer.Pass(); + return staging_buffer; } base::TimeTicks OneCopyTileTaskWorkerPool::GetUsageTimeForLRUBuffer() { diff --git a/cc/raster/task_graph_runner_unittest.cc b/cc/raster/task_graph_runner_unittest.cc index 31144e7..3e8a339 100644 --- a/cc/raster/task_graph_runner_unittest.cc +++ b/cc/raster/task_graph_runner_unittest.cc @@ -174,7 +174,7 @@ class TaskGraphRunnerTest : public TaskGraphRunnerTestBase, scoped_ptr<base::DelegateSimpleThread> worker = make_scoped_ptr(new base::DelegateSimpleThread(this, "TestWorker")); worker->Start(); - workers_.push_back(worker.Pass()); + workers_.push_back(std::move(worker)); } for (int i = 0; i < kNamespaceCount; ++i) diff --git a/cc/raster/tile_task_worker_pool_perftest.cc b/cc/raster/tile_task_worker_pool_perftest.cc index a67f6b0..7d6706d 100644 --- a/cc/raster/tile_task_worker_pool_perftest.cc +++ b/cc/raster/tile_task_worker_pool_perftest.cc @@ -146,7 +146,7 @@ class PerfRasterTaskImpl : public RasterTask { public: PerfRasterTaskImpl(scoped_ptr<ScopedResource> resource, ImageDecodeTask::Vector* dependencies) - : RasterTask(dependencies), resource_(resource.Pass()) {} + : RasterTask(dependencies), resource_(std::move(resource)) {} // Overridden from Task: void RunOnWorkerThread() override {} @@ -157,7 +157,7 @@ class PerfRasterTaskImpl : public RasterTask { raster_buffer_ = client->AcquireBufferForRaster(resource_.get(), 0, 0); } void CompleteOnOriginThread(TileTaskClient* client) override { - client->ReleaseBufferForRaster(raster_buffer_.Pass()); + client->ReleaseBufferForRaster(std::move(raster_buffer_)); Reset(); } @@ -209,7 +209,7 @@ class TileTaskWorkerPoolPerfTestBase { ImageDecodeTask::Vector dependencies = image_decode_tasks; raster_tasks->push_back( - new PerfRasterTaskImpl(resource.Pass(), &dependencies)); + new PerfRasterTaskImpl(std::move(resource), &dependencies)); } } diff --git a/cc/raster/tile_task_worker_pool_unittest.cc b/cc/raster/tile_task_worker_pool_unittest.cc index 9cbbd7e..aff1423 100644 --- a/cc/raster/tile_task_worker_pool_unittest.cc +++ b/cc/raster/tile_task_worker_pool_unittest.cc @@ -75,7 +75,7 @@ class TestRasterTaskImpl : public RasterTask { raster_buffer_ = client->AcquireBufferForRaster(resource_, 0, 0); } void CompleteOnOriginThread(TileTaskClient* client) override { - client->ReleaseBufferForRaster(raster_buffer_.Pass()); + client->ReleaseBufferForRaster(std::move(raster_buffer_)); reply_.Run(DisplayListRasterSource::SolidColorAnalysis(), !HasFinishedRunning()); } diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc index de1d015..f7e230f 100644 --- a/cc/test/animation_test_common.cc +++ b/cc/test/animation_test_common.cc @@ -37,19 +37,19 @@ int AddOpacityTransition(Target* target, if (!use_timing_function) func = EaseTimingFunction::Create(); if (duration > 0.0) - curve->AddKeyframe( - FloatKeyframe::Create(base::TimeDelta(), start_opacity, func.Pass())); + curve->AddKeyframe(FloatKeyframe::Create(base::TimeDelta(), start_opacity, + std::move(func))); curve->AddKeyframe(FloatKeyframe::Create( base::TimeDelta::FromSecondsD(duration), end_opacity, nullptr)); int id = AnimationIdProvider::NextAnimationId(); - scoped_ptr<Animation> animation( - Animation::Create(curve.Pass(), id, AnimationIdProvider::NextGroupId(), - Animation::OPACITY)); + scoped_ptr<Animation> animation(Animation::Create( + std::move(curve), id, AnimationIdProvider::NextGroupId(), + Animation::OPACITY)); animation->set_needs_synchronized_start_time(true); - target->AddAnimation(animation.Pass()); + target->AddAnimation(std::move(animation)); return id; } @@ -71,12 +71,12 @@ int AddAnimatedTransform(Target* target, int id = AnimationIdProvider::NextAnimationId(); - scoped_ptr<Animation> animation( - Animation::Create(curve.Pass(), id, AnimationIdProvider::NextGroupId(), - Animation::TRANSFORM)); + scoped_ptr<Animation> animation(Animation::Create( + std::move(curve), id, AnimationIdProvider::NextGroupId(), + Animation::TRANSFORM)); animation->set_needs_synchronized_start_time(true); - target->AddAnimation(animation.Pass()); + target->AddAnimation(std::move(animation)); return id; } @@ -118,11 +118,12 @@ int AddAnimatedFilter(Target* target, int id = AnimationIdProvider::NextAnimationId(); - scoped_ptr<Animation> animation(Animation::Create( - curve.Pass(), id, AnimationIdProvider::NextGroupId(), Animation::FILTER)); + scoped_ptr<Animation> animation( + Animation::Create(std::move(curve), id, + AnimationIdProvider::NextGroupId(), Animation::FILTER)); animation->set_needs_synchronized_start_time(true); - target->AddAnimation(animation.Pass()); + target->AddAnimation(std::move(animation)); return id; } @@ -399,19 +400,19 @@ int AddOpacityStepsToController(LayerAnimationController* target, scoped_ptr<TimingFunction> func = StepsTimingFunction::Create(num_steps, 0.5f); if (duration > 0.0) - curve->AddKeyframe( - FloatKeyframe::Create(base::TimeDelta(), start_opacity, func.Pass())); + curve->AddKeyframe(FloatKeyframe::Create(base::TimeDelta(), start_opacity, + std::move(func))); curve->AddKeyframe(FloatKeyframe::Create( base::TimeDelta::FromSecondsD(duration), end_opacity, nullptr)); int id = AnimationIdProvider::NextAnimationId(); - scoped_ptr<Animation> animation( - Animation::Create(curve.Pass(), id, AnimationIdProvider::NextGroupId(), - Animation::OPACITY)); + scoped_ptr<Animation> animation(Animation::Create( + std::move(curve), id, AnimationIdProvider::NextGroupId(), + Animation::OPACITY)); animation->set_needs_synchronized_start_time(true); - target->AddAnimation(animation.Pass()); + target->AddAnimation(std::move(animation)); return id; } diff --git a/cc/test/animation_timelines_test_common.cc b/cc/test/animation_timelines_test_common.cc index 381f004..9212da6 100644 --- a/cc/test/animation_timelines_test_common.cc +++ b/cc/test/animation_timelines_test_common.cc @@ -241,7 +241,7 @@ void AnimationTimelinesTest::AnimateLayersTransferEvents( host_->animation_registrar()->AnimateLayers(time); host_->animation_registrar()->UpdateAnimationState(true, nullptr); - host_->animation_registrar()->SetAnimationEvents(events.Pass()); + host_->animation_registrar()->SetAnimationEvents(std::move(events)); } AnimationPlayer* AnimationTimelinesTest::GetPlayerForLayerId(int layer_id) { diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc index bfa7c19..0238498 100644 --- a/cc/test/fake_content_layer_client.cc +++ b/cc/test/fake_content_layer_client.cc @@ -60,7 +60,7 @@ FakeContentLayerClient::PaintContentsToDisplayList( canvas->drawRect(gfx::RectFToSkRect(draw_rect), paint); picture = skia::AdoptRef(recorder.endRecordingAsPicture()); auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(); - item->SetNew(picture.Pass()); + item->SetNew(std::move(picture)); } for (ImageVector::const_iterator it = draw_images_.begin(); @@ -75,7 +75,7 @@ FakeContentLayerClient::PaintContentsToDisplayList( &it->paint); picture = skia::AdoptRef(recorder.endRecordingAsPicture()); auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(); - item->SetNew(picture.Pass()); + item->SetNew(std::move(picture)); if (!it->transform.IsIdentity()) { display_list->CreateAndAppendItem<EndTransformDisplayItem>(); } @@ -92,7 +92,7 @@ FakeContentLayerClient::PaintContentsToDisplayList( canvas->drawIRect(gfx::RectToSkIRect(draw_rect), paint); picture = skia::AdoptRef(recorder.endRecordingAsPicture()); auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(); - item->SetNew(picture.Pass()); + item->SetNew(std::move(picture)); draw_rect.Inset(1, 1); } } diff --git a/cc/test/fake_layer_tree_host.cc b/cc/test/fake_layer_tree_host.cc index 30083d6..0c4109e 100644 --- a/cc/test/fake_layer_tree_host.cc +++ b/cc/test/fake_layer_tree_host.cc @@ -49,11 +49,11 @@ LayerImpl* FakeLayerTreeHost::CommitAndCreateLayerImplTree() { scoped_ptr<LayerImpl> old_root_layer_impl = active_tree()->DetachLayerTree(); scoped_ptr<LayerImpl> layer_impl = TreeSynchronizer::SynchronizeTrees( - root_layer(), old_root_layer_impl.Pass(), active_tree()); + root_layer(), std::move(old_root_layer_impl), active_tree()); active_tree()->SetPropertyTrees(*property_trees()); TreeSynchronizer::PushProperties(root_layer(), layer_impl.get()); - active_tree()->SetRootLayer(layer_impl.Pass()); + active_tree()->SetRootLayer(std::move(layer_impl)); if (page_scale_layer() && inner_viewport_scroll_layer()) { active_tree()->SetViewportLayersFromIds( diff --git a/cc/test/fake_layer_tree_host_client.cc b/cc/test/fake_layer_tree_host_client.cc index a4a5d7e..43e6d2b 100644 --- a/cc/test/fake_layer_tree_host_client.cc +++ b/cc/test/fake_layer_tree_host_client.cc @@ -37,7 +37,7 @@ void FakeLayerTreeHostClient::RequestNewOutputSurface() { } else { surface = FakeOutputSurface::Create3d(); } - host_->SetOutputSurface(surface.Pass()); + host_->SetOutputSurface(std::move(surface)); } void FakeLayerTreeHostClient::DidFailToInitializeOutputSurface() { diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc index 4855f30..a1f77498 100644 --- a/cc/test/fake_output_surface.cc +++ b/cc/test/fake_output_surface.cc @@ -44,7 +44,7 @@ FakeOutputSurface::FakeOutputSurface( FakeOutputSurface::FakeOutputSurface( scoped_ptr<SoftwareOutputDevice> software_device, bool delegated_rendering) - : OutputSurface(software_device.Pass()), + : OutputSurface(std::move(software_device)), client_(NULL), num_sent_frames_(0), has_external_stencil_test_(false), @@ -58,7 +58,7 @@ FakeOutputSurface::FakeOutputSurface( scoped_refptr<ContextProvider> context_provider, scoped_ptr<SoftwareOutputDevice> software_device, bool delegated_rendering) - : OutputSurface(context_provider, software_device.Pass()), + : OutputSurface(context_provider, std::move(software_device)), client_(NULL), num_sent_frames_(0), has_external_stencil_test_(false), diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h index 14ec0f2..06e19c9 100644 --- a/cc/test/fake_output_surface.h +++ b/cc/test/fake_output_surface.h @@ -44,14 +44,14 @@ class FakeOutputSurface : public OutputSurface { static scoped_ptr<FakeOutputSurface> Create3d( scoped_ptr<TestWebGraphicsContext3D> context) { return make_scoped_ptr( - new FakeOutputSurface(TestContextProvider::Create(context.Pass()), + new FakeOutputSurface(TestContextProvider::Create(std::move(context)), TestContextProvider::CreateWorker(), false)); } static scoped_ptr<FakeOutputSurface> CreateSoftware( scoped_ptr<SoftwareOutputDevice> software_device) { - return make_scoped_ptr(new FakeOutputSurface(software_device.Pass(), - false)); + return make_scoped_ptr( + new FakeOutputSurface(std::move(software_device), false)); } static scoped_ptr<FakeOutputSurface> CreateDelegating3d() { @@ -69,29 +69,29 @@ class FakeOutputSurface : public OutputSurface { static scoped_ptr<FakeOutputSurface> CreateDelegating3d( scoped_ptr<TestWebGraphicsContext3D> context) { return make_scoped_ptr( - new FakeOutputSurface(TestContextProvider::Create(context.Pass()), + new FakeOutputSurface(TestContextProvider::Create(std::move(context)), TestContextProvider::CreateWorker(), true)); } static scoped_ptr<FakeOutputSurface> CreateDelegatingSoftware( scoped_ptr<SoftwareOutputDevice> software_device) { return make_scoped_ptr( - new FakeOutputSurface(software_device.Pass(), true)); + new FakeOutputSurface(std::move(software_device), true)); } static scoped_ptr<FakeOutputSurface> CreateNoRequireSyncPoint( scoped_ptr<TestWebGraphicsContext3D> context) { - scoped_ptr<FakeOutputSurface> surface(Create3d(context.Pass())); + scoped_ptr<FakeOutputSurface> surface(Create3d(std::move(context))); surface->capabilities_.delegated_sync_points_required = false; - return surface.Pass(); + return surface; } static scoped_ptr<FakeOutputSurface> CreateOffscreen( scoped_ptr<TestWebGraphicsContext3D> context) { scoped_ptr<FakeOutputSurface> surface(new FakeOutputSurface( - TestContextProvider::Create(context.Pass()), false)); + TestContextProvider::Create(std::move(context)), false)); surface->capabilities_.uses_default_gl_framebuffer = false; - return surface.Pass(); + return surface; } void set_max_frames_pending(int max) { diff --git a/cc/test/fake_picture_layer.cc b/cc/test/fake_picture_layer.cc index 8892d4c..50b9e7d 100644 --- a/cc/test/fake_picture_layer.cc +++ b/cc/test/fake_picture_layer.cc @@ -22,7 +22,7 @@ FakePictureLayer::FakePictureLayer( const LayerSettings& settings, ContentLayerClient* client, scoped_ptr<DisplayListRecordingSource> source) - : PictureLayer(settings, client, source.Pass()), + : PictureLayer(settings, client, std::move(source)), update_count_(0), push_properties_count_(0), always_update_resources_(false) { diff --git a/cc/test/fake_picture_layer.h b/cc/test/fake_picture_layer.h index aee328f..96dae06 100644 --- a/cc/test/fake_picture_layer.h +++ b/cc/test/fake_picture_layer.h @@ -23,7 +23,7 @@ class FakePictureLayer : public PictureLayer { ContentLayerClient* client, scoped_ptr<DisplayListRecordingSource> source) { return make_scoped_refptr( - new FakePictureLayer(settings, client, source.Pass())); + new FakePictureLayer(settings, client, std::move(source))); } scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h index e322632..85f2f8a 100644 --- a/cc/test/layer_test_common.h +++ b/cc/test/layer_test_common.h @@ -57,7 +57,7 @@ class LayerTestCommon { scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(), layer_impl_id_++); T* ptr = layer.get(); - root_layer_impl_->AddChild(layer.Pass()); + root_layer_impl_->AddChild(std::move(layer)); return ptr; } @@ -66,7 +66,7 @@ class LayerTestCommon { scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(), layer_impl_id_++); T* ptr = layer.get(); - parent->AddChild(layer.Pass()); + parent->AddChild(std::move(layer)); return ptr; } @@ -75,7 +75,7 @@ class LayerTestCommon { scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a); T* ptr = layer.get(); - root_layer_impl_->AddChild(layer.Pass()); + root_layer_impl_->AddChild(std::move(layer)); return ptr; } @@ -84,7 +84,7 @@ class LayerTestCommon { scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a, b); T* ptr = layer.get(); - root_layer_impl_->AddChild(layer.Pass()); + root_layer_impl_->AddChild(std::move(layer)); return ptr; } @@ -93,7 +93,7 @@ class LayerTestCommon { scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a, b, c, d); T* ptr = layer.get(); - root_layer_impl_->AddChild(layer.Pass()); + root_layer_impl_->AddChild(std::move(layer)); return ptr; } @@ -111,7 +111,7 @@ class LayerTestCommon { scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a, b, c, d, e); T* ptr = layer.get(); - root_layer_impl_->AddChild(layer.Pass()); + root_layer_impl_->AddChild(std::move(layer)); return ptr; } diff --git a/cc/test/layer_tree_json_parser_unittest.cc b/cc/test/layer_tree_json_parser_unittest.cc index c39423f..d0f7544 100644 --- a/cc/test/layer_tree_json_parser_unittest.cc +++ b/cc/test/layer_tree_json_parser_unittest.cc @@ -83,9 +83,9 @@ TEST_F(LayerTreeJsonParserSanityCheck, Basic) { child->SetHaveWheelEventHandlers(true); child->SetHaveScrollEventHandlers(true); - parent->AddChild(child.Pass()); - root_impl->AddChild(parent.Pass()); - tree->SetRootLayer(root_impl.Pass()); + parent->AddChild(std::move(child)); + root_impl->AddChild(std::move(parent)); + tree->SetRootLayer(std::move(root_impl)); std::string json = host_impl.LayerTreeAsJson(); scoped_refptr<Layer> root = ParseTreeFromJson(json, NULL); @@ -112,8 +112,8 @@ TEST_F(LayerTreeJsonParserSanityCheck, EventHandlerRegions) { touch_region.Union(gfx::Rect(40, 10, 20, 20)); touch_layer->SetTouchEventHandlerRegion(touch_region); - root_impl->AddChild(touch_layer.Pass()); - tree->SetRootLayer(root_impl.Pass()); + root_impl->AddChild(std::move(touch_layer)); + tree->SetRootLayer(std::move(root_impl)); std::string json = host_impl.LayerTreeAsJson(); scoped_refptr<Layer> root = ParseTreeFromJson(json, NULL); diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc index b4fafd2..c48b8c0 100644 --- a/cc/test/layer_tree_pixel_test.cc +++ b/cc/test/layer_tree_pixel_test.cc @@ -46,7 +46,7 @@ scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface() { software_output_device->set_surface_expansion_size( surface_expansion_size); output_surface = make_scoped_ptr( - new PixelTestOutputSurface(software_output_device.Pass())); + new PixelTestOutputSurface(std::move(software_output_device))); break; } case PIXEL_TEST_GL: { @@ -59,7 +59,7 @@ scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface() { } output_surface->set_surface_expansion_size(surface_expansion_size); - return output_surface.Pass(); + return std::move(output_surface); } void LayerTreePixelTest::WillCommitCompleteOnThread(LayerTreeHostImpl* impl) { @@ -280,7 +280,7 @@ scoped_ptr<SkBitmap> LayerTreePixelTest::CopyTextureMailboxToBitmap( } } - return bitmap.Pass(); + return bitmap; } void LayerTreePixelTest::Finish() { diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc index b6c8570..0578128 100644 --- a/cc/test/layer_tree_test.cc +++ b/cc/test/layer_tree_test.cc @@ -122,7 +122,7 @@ class ThreadProxyForTest : public ThreadProxy { scoped_ptr<BeginFrameSource> external_begin_frame_source) { return make_scoped_ptr( new ThreadProxyForTest(test_hooks, host, task_runner_provider, - external_begin_frame_source.Pass())); + std::move(external_begin_frame_source))); } ~ThreadProxyForTest() override {} @@ -295,7 +295,7 @@ class ThreadProxyForTest : public ThreadProxy { void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events) override { test_hooks_->ReceivedSetAnimationEvents(); - ThreadProxy::SetAnimationEvents(events.Pass()); + ThreadProxy::SetAnimationEvents(std::move(events)); } void DidLoseOutputSurface() override { @@ -325,14 +325,14 @@ class ThreadProxyForTest : public ThreadProxy { scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) override { test_hooks_->ReceivedPostFrameTimingEventsOnMain(); - ThreadProxy::PostFrameTimingEventsOnMain(composite_events.Pass(), - main_frame_events.Pass()); + ThreadProxy::PostFrameTimingEventsOnMain(std::move(composite_events), + std::move(main_frame_events)); } void BeginMainFrame(scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override { test_hooks_->ReceivedBeginMainFrame(); - ThreadProxy::BeginMainFrame(begin_main_frame_state.Pass()); + ThreadProxy::BeginMainFrame(std::move(begin_main_frame_state)); }; ThreadProxyForTest(TestHooks* test_hooks, @@ -341,7 +341,7 @@ class ThreadProxyForTest : public ThreadProxy { scoped_ptr<BeginFrameSource> external_begin_frame_source) : ThreadProxy(host, task_runner_provider, - external_begin_frame_source.Pass()), + std::move(external_begin_frame_source)), test_hooks_(test_hooks) {} }; @@ -356,7 +356,7 @@ class SingleThreadProxyForTest : public SingleThreadProxy { scoped_ptr<BeginFrameSource> external_begin_frame_source) { return make_scoped_ptr(new SingleThreadProxyForTest( test_hooks, host, client, task_runner_provider, - external_begin_frame_source.Pass())); + std::move(external_begin_frame_source))); } ~SingleThreadProxyForTest() override {} @@ -416,7 +416,7 @@ class SingleThreadProxyForTest : public SingleThreadProxy { : SingleThreadProxy(host, client, task_runner_provider, - external_begin_frame_source.Pass()), + std::move(external_begin_frame_source)), test_hooks_(test_hooks) {} }; @@ -708,17 +708,17 @@ class LayerTreeHostForTesting : public LayerTreeHost { TaskRunnerProvider::Create(main_task_runner, impl_task_runner); scoped_ptr<Proxy> proxy; if (impl_task_runner.get()) { - proxy = ThreadProxyForTest::Create(test_hooks, layer_tree_host.get(), - task_runner_provider.get(), - external_begin_frame_source.Pass()); + proxy = ThreadProxyForTest::Create( + test_hooks, layer_tree_host.get(), task_runner_provider.get(), + std::move(external_begin_frame_source)); } else { proxy = SingleThreadProxyForTest::Create( test_hooks, layer_tree_host.get(), client, task_runner_provider.get(), - external_begin_frame_source.Pass()); + std::move(external_begin_frame_source)); } - layer_tree_host->InitializeForTesting(task_runner_provider.Pass(), - proxy.Pass()); - return layer_tree_host.Pass(); + layer_tree_host->InitializeForTesting(std::move(task_runner_provider), + std::move(proxy)); + return layer_tree_host; } scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( @@ -930,7 +930,7 @@ void LayerTreeTest::DoBeginTest() { gpu_memory_buffer_manager_.get(), task_graph_runner_.get(), settings_, base::ThreadTaskRunnerHandle::Get(), impl_thread_ ? impl_thread_->task_runner() : NULL, - external_begin_frame_source.Pass()); + std::move(external_begin_frame_source)); ASSERT_TRUE(layer_tree_host_); started_ = true; @@ -1119,7 +1119,7 @@ scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() { DCHECK(external_begin_frame_source_); DCHECK(external_begin_frame_source_->is_ready()); } - return output_surface.Pass(); + return std::move(output_surface); } scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface() { diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc index 9adc94d..93f6341 100644 --- a/cc/test/pixel_test.cc +++ b/cc/test/pixel_test.cc @@ -72,7 +72,7 @@ bool PixelTest::RunPixelTestWithReadbackTargetAndArea( run_loop.QuitClosure())); if (copy_rect) request->set_area(*copy_rect); - target->copy_requests.push_back(request.Pass()); + target->copy_requests.push_back(std::move(request)); float device_scale_factor = 1.f; gfx::Rect device_viewport_rect = @@ -170,7 +170,7 @@ void PixelTest::EnableExternalStencilTest() { void PixelTest::SetUpSoftwareRenderer() { scoped_ptr<SoftwareOutputDevice> device(new PixelTestSoftwareOutputDevice()); - output_surface_.reset(new PixelTestOutputSurface(device.Pass())); + output_surface_.reset(new PixelTestOutputSurface(std::move(device))); output_surface_->BindToClient(output_surface_client_.get()); shared_bitmap_manager_.reset(new TestSharedBitmapManager()); resource_provider_ = ResourceProvider::Create( diff --git a/cc/test/pixel_test_output_surface.cc b/cc/test/pixel_test_output_surface.cc index c5137393..6d5072c 100644 --- a/cc/test/pixel_test_output_surface.cc +++ b/cc/test/pixel_test_output_surface.cc @@ -29,8 +29,8 @@ PixelTestOutputSurface::PixelTestOutputSurface( PixelTestOutputSurface::PixelTestOutputSurface( scoped_ptr<SoftwareOutputDevice> software_device) - : OutputSurface(software_device.Pass()), external_stencil_test_(false) { -} + : OutputSurface(std::move(software_device)), + external_stencil_test_(false) {} void PixelTestOutputSurface::Reshape(const gfx::Size& size, float scale_factor) { diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc index f65ff07..1bb9966 100644 --- a/cc/test/render_pass_test_utils.cc +++ b/cc/test/render_pass_test_utils.cc @@ -28,7 +28,7 @@ RenderPass* AddRenderPass(RenderPassList* pass_list, scoped_ptr<RenderPass> pass(RenderPass::Create()); pass->SetNew(id, output_rect, output_rect, root_transform); RenderPass* saved = pass.get(); - pass_list->push_back(pass.Pass()); + pass_list->push_back(std::move(pass)); return saved; } @@ -197,7 +197,7 @@ void AddOneOfEveryQuadType(RenderPass* to_pass, TextureMailbox mailbox( gpu_mailbox, gpu::SyncToken(*sync_point_for_mailbox_texture), target); ResourceId resource8 = resource_provider->CreateResourceFromTextureMailbox( - mailbox, callback.Pass()); + mailbox, std::move(callback)); resource_provider->AllocateForTesting(resource8); SharedQuadState* shared_state = to_pass->CreateAndAppendSharedQuadState(); diff --git a/cc/test/scheduler_test_common.cc b/cc/test/scheduler_test_common.cc index ffbc244..c891a81 100644 --- a/cc/test/scheduler_test_common.cc +++ b/cc/test/scheduler_test_common.cc @@ -60,8 +60,7 @@ base::TimeTicks TestBackToBackBeginFrameSource::Now() { TestSyntheticBeginFrameSource::TestSyntheticBeginFrameSource( scoped_ptr<DelayBasedTimeSource> time_source) - : SyntheticBeginFrameSource(time_source.Pass()) { -} + : SyntheticBeginFrameSource(std::move(time_source)) {} TestSyntheticBeginFrameSource::~TestSyntheticBeginFrameSource() { } @@ -69,8 +68,8 @@ TestSyntheticBeginFrameSource::~TestSyntheticBeginFrameSource() { scoped_ptr<FakeCompositorTimingHistory> FakeCompositorTimingHistory::Create() { scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation = RenderingStatsInstrumentation::Create(); - return make_scoped_ptr( - new FakeCompositorTimingHistory(rendering_stats_instrumentation.Pass())); + return make_scoped_ptr(new FakeCompositorTimingHistory( + std::move(rendering_stats_instrumentation))); } FakeCompositorTimingHistory::FakeCompositorTimingHistory( @@ -78,7 +77,7 @@ FakeCompositorTimingHistory::FakeCompositorTimingHistory( : CompositorTimingHistory(CompositorTimingHistory::NULL_UMA, rendering_stats_instrumentation.get()), rendering_stats_instrumentation_owned_( - rendering_stats_instrumentation.Pass()) {} + std::move(rendering_stats_instrumentation)) {} FakeCompositorTimingHistory::~FakeCompositorTimingHistory() { } @@ -156,8 +155,9 @@ scoped_ptr<TestScheduler> TestScheduler::Create( TestBackToBackBeginFrameSource::Create(now_src, task_runner); return make_scoped_ptr(new TestScheduler( now_src, client, settings, layer_tree_host_id, task_runner, - external_frame_source, synthetic_frame_source.Pass(), - unthrottled_frame_source.Pass(), compositor_timing_history.Pass())); + external_frame_source, std::move(synthetic_frame_source), + std::move(unthrottled_frame_source), + std::move(compositor_timing_history))); } TestScheduler::TestScheduler( @@ -175,11 +175,10 @@ TestScheduler::TestScheduler( layer_tree_host_id, task_runner, external_frame_source, - synthetic_frame_source.Pass(), - unthrottled_frame_source.Pass(), - compositor_timing_history.Pass()), - now_src_(now_src) { -} + std::move(synthetic_frame_source), + std::move(unthrottled_frame_source), + std::move(compositor_timing_history)), + now_src_(now_src) {} base::TimeTicks TestScheduler::Now() const { return now_src_->NowTicks(); diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h index 41c2145..5f7a12b 100644 --- a/cc/test/scheduler_test_common.h +++ b/cc/test/scheduler_test_common.h @@ -150,7 +150,7 @@ class TestSyntheticBeginFrameSource : public SyntheticBeginFrameSource { TestDelayBasedTimeSource::Create(now_src, initial_interval, task_runner); return make_scoped_ptr( - new TestSyntheticBeginFrameSource(time_source.Pass())); + new TestSyntheticBeginFrameSource(std::move(time_source))); } protected: diff --git a/cc/test/solid_color_content_layer_client.cc b/cc/test/solid_color_content_layer_client.cc index ed84bec..495e069 100644 --- a/cc/test/solid_color_content_layer_client.cc +++ b/cc/test/solid_color_content_layer_client.cc @@ -39,7 +39,7 @@ SolidColorContentLayerClient::PaintContentsToDisplayList( skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecordingAsPicture()); - item->SetNew(picture.Pass()); + item->SetNew(std::move(picture)); display_list->Finalize(); return display_list; diff --git a/cc/test/surface_hittest_test_helpers.cc b/cc/test/surface_hittest_test_helpers.cc index c7d37e5..8c57959 100644 --- a/cc/test/surface_hittest_test_helpers.cc +++ b/cc/test/surface_hittest_test_helpers.cc @@ -65,7 +65,7 @@ void CreateRenderPass(const RenderPassId& render_pass_id, RenderPassList* render_pass_list) { scoped_ptr<RenderPass> render_pass = RenderPass::Create(); render_pass->SetNew(render_pass_id, rect, rect, transform_to_root_target); - render_pass_list->push_back(render_pass.Pass()); + render_pass_list->push_back(std::move(render_pass)); } scoped_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList( @@ -74,7 +74,7 @@ scoped_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList( new DelegatedFrameData); root_delegated_frame_data->render_pass_list.swap(*render_pass_list); scoped_ptr<CompositorFrame> root_frame(new CompositorFrame); - root_frame->delegated_frame_data = root_delegated_frame_data.Pass(); + root_frame->delegated_frame_data = std::move(root_delegated_frame_data); return root_frame; } diff --git a/cc/test/test_context_provider.cc b/cc/test/test_context_provider.cc index 0c45e62..3a570ca 100644 --- a/cc/test/test_context_provider.cc +++ b/cc/test/test_context_provider.cc @@ -40,12 +40,12 @@ scoped_refptr<TestContextProvider> TestContextProvider::Create( scoped_ptr<TestWebGraphicsContext3D> context) { if (!context) return NULL; - return new TestContextProvider(context.Pass()); + return new TestContextProvider(std::move(context)); } TestContextProvider::TestContextProvider( scoped_ptr<TestWebGraphicsContext3D> context) - : context3d_(context.Pass()), + : context3d_(std::move(context)), context_gl_(new TestGLES2Interface(context3d_.get())), bound_(false), weak_ptr_factory_(this) { diff --git a/cc/test/test_gpu_memory_buffer_manager.cc b/cc/test/test_gpu_memory_buffer_manager.cc index af86cbb..273ed36 100644 --- a/cc/test/test_gpu_memory_buffer_manager.cc +++ b/cc/test/test_gpu_memory_buffer_manager.cc @@ -21,7 +21,7 @@ class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { size_t stride) : size_(size), format_(format), - shared_memory_(shared_memory.Pass()), + shared_memory_(std::move(shared_memory)), offset_(offset), stride_(stride), mapped_(false) {} @@ -96,7 +96,7 @@ TestGpuMemoryBufferManager::AllocateGpuMemoryBuffer(const gfx::Size& size, if (!shared_memory->CreateAnonymous(buffer_size)) return nullptr; return make_scoped_ptr<gfx::GpuMemoryBuffer>(new GpuMemoryBufferImpl( - size, format, shared_memory.Pass(), 0, + size, format, std::move(shared_memory), 0, base::checked_cast<int>( gfx::RowSizeForBufferFormat(size.width(), format, 0)))); } diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc index a56560f..a0b4c28 100644 --- a/cc/test/test_in_process_context_provider.cc +++ b/cc/test/test_in_process_context_provider.cc @@ -55,7 +55,7 @@ scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext( image_factory)); DCHECK(context); - return context.Pass(); + return context; } scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() { diff --git a/cc/test/test_shared_bitmap_manager.cc b/cc/test/test_shared_bitmap_manager.cc index 7e14b2f..ef3b484 100644 --- a/cc/test/test_shared_bitmap_manager.cc +++ b/cc/test/test_shared_bitmap_manager.cc @@ -14,7 +14,7 @@ class OwnedSharedBitmap : public SharedBitmap { OwnedSharedBitmap(scoped_ptr<base::SharedMemory> shared_memory, const SharedBitmapId& id) : SharedBitmap(static_cast<uint8*>(shared_memory->memory()), id), - shared_memory_(shared_memory.Pass()) {} + shared_memory_(std::move(shared_memory)) {} ~OwnedSharedBitmap() override {} @@ -35,7 +35,7 @@ scoped_ptr<SharedBitmap> TestSharedBitmapManager::AllocateSharedBitmap( memory->CreateAndMapAnonymous(size.GetArea() * 4); SharedBitmapId id = SharedBitmap::GenerateId(); bitmap_map_[id] = memory.get(); - return make_scoped_ptr(new OwnedSharedBitmap(memory.Pass(), id)); + return make_scoped_ptr(new OwnedSharedBitmap(std::move(memory), id)); } scoped_ptr<SharedBitmap> TestSharedBitmapManager::GetSharedBitmapFromId( diff --git a/cc/tiles/eviction_tile_priority_queue.cc b/cc/tiles/eviction_tile_priority_queue.cc index 743c982..5668f0f 100644 --- a/cc/tiles/eviction_tile_priority_queue.cc +++ b/cc/tiles/eviction_tile_priority_queue.cc @@ -72,7 +72,7 @@ void CreateTilingSetEvictionQueues( new TilingSetEvictionQueue(layer->picture_layer_tiling_set())); // Queues will only contain non empty tiling sets. if (!tiling_set_queue->IsEmpty()) - queues->push_back(tiling_set_queue.Pass()); + queues->push_back(std::move(tiling_set_queue)); } std::make_heap(queues->begin(), queues->end(), EvictionOrderComparator(tree_priority)); diff --git a/cc/tiles/picture_layer_tiling.cc b/cc/tiles/picture_layer_tiling.cc index 4cb66a5c..747dd94 100644 --- a/cc/tiles/picture_layer_tiling.cc +++ b/cc/tiles/picture_layer_tiling.cc @@ -115,7 +115,7 @@ Tile* PictureLayerTiling::CreateTile(const Tile::CreateInfo& info) { all_tiles_done_ = false; ScopedTilePtr tile = client_->CreateTile(info); Tile* raw_ptr = tile.get(); - tiles_.add(key, tile.Pass()); + tiles_.add(key, std::move(tile)); return raw_ptr; } diff --git a/cc/tiles/picture_layer_tiling_set.cc b/cc/tiles/picture_layer_tiling_set.cc index 7e41bcf..77589c1 100644 --- a/cc/tiles/picture_layer_tiling_set.cc +++ b/cc/tiles/picture_layer_tiling_set.cc @@ -80,7 +80,7 @@ void PictureLayerTilingSet::CopyTilingsAndPropertiesFromPendingTwin( tree_, contents_scale, raster_source, client_, tiling_interest_area_padding_, skewport_target_time_in_seconds_, skewport_extrapolation_limit_in_content_pixels_); - tilings_.push_back(new_tiling.Pass()); + tilings_.push_back(std::move(new_tiling)); this_tiling = tilings_.back().get(); tiling_sort_required = true; } diff --git a/cc/tiles/raster_tile_priority_queue.cc b/cc/tiles/raster_tile_priority_queue.cc index afa3755..0b47407 100644 --- a/cc/tiles/raster_tile_priority_queue.cc +++ b/cc/tiles/raster_tile_priority_queue.cc @@ -20,14 +20,14 @@ scoped_ptr<RasterTilePriorityQueue> RasterTilePriorityQueue::Create( scoped_ptr<RasterTilePriorityQueueAll> queue( new RasterTilePriorityQueueAll); queue->Build(active_layers, pending_layers, tree_priority); - return queue.Pass(); + return std::move(queue); } case Type::REQUIRED_FOR_ACTIVATION: case Type::REQUIRED_FOR_DRAW: { scoped_ptr<RasterTilePriorityQueueRequired> queue( new RasterTilePriorityQueueRequired); queue->Build(active_layers, pending_layers, type); - return queue.Pass(); + return std::move(queue); } } NOTREACHED(); diff --git a/cc/tiles/raster_tile_priority_queue_all.cc b/cc/tiles/raster_tile_priority_queue_all.cc index beca4d5..09c5c78 100644 --- a/cc/tiles/raster_tile_priority_queue_all.cc +++ b/cc/tiles/raster_tile_priority_queue_all.cc @@ -64,7 +64,7 @@ void CreateTilingSetRasterQueues( new TilingSetRasterQueueAll(tiling_set, prioritize_low_res)); // Queues will only contain non empty tiling sets. if (!tiling_set_queue->IsEmpty()) - queues->push_back(tiling_set_queue.Pass()); + queues->push_back(std::move(tiling_set_queue)); } std::make_heap(queues->begin(), queues->end(), RasterOrderComparator(tree_priority)); diff --git a/cc/tiles/raster_tile_priority_queue_required.cc b/cc/tiles/raster_tile_priority_queue_required.cc index 5c5fd7e..24d9789 100644 --- a/cc/tiles/raster_tile_priority_queue_required.cc +++ b/cc/tiles/raster_tile_priority_queue_required.cc @@ -22,7 +22,7 @@ void AppendTilingSetRequiredQueues( layer->picture_layer_tiling_set(), RasterTilePriorityQueueRequired::Type::REQUIRED_FOR_ACTIVATION)); if (!tiling_set_queue->IsEmpty()) - queues->push_back(tiling_set_queue.Pass()); + queues->push_back(std::move(tiling_set_queue)); } } @@ -55,7 +55,7 @@ void RasterTilePriorityQueueRequired::BuildRequiredForDraw( new TilingSetRasterQueueRequired(layer->picture_layer_tiling_set(), Type::REQUIRED_FOR_DRAW)); if (!tiling_set_queue->IsEmpty()) - tiling_set_queues_.push_back(tiling_set_queue.Pass()); + tiling_set_queues_.push_back(std::move(tiling_set_queue)); } } diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc index 898b3e3..d7b91bfc 100644 --- a/cc/tiles/tile_manager.cc +++ b/cc/tiles/tile_manager.cc @@ -97,7 +97,7 @@ class RasterTaskImpl : public RasterTask { resource_, resource_content_id_, previous_content_id_); } void CompleteOnOriginThread(TileTaskClient* client) override { - client->ReleaseBufferForRaster(raster_buffer_.Pass()); + client->ReleaseBufferForRaster(std::move(raster_buffer_)); reply_.Run(analysis_, !HasFinishedRunning()); } @@ -545,7 +545,7 @@ void TileManager::AssignGpuMemoryToTiles( tile_memory_limit - memory_required_by_tile_to_be_scheduled; eviction_priority_queue = FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit( - eviction_priority_queue.Pass(), scheduled_tile_memory_limit, + std::move(eviction_priority_queue), scheduled_tile_memory_limit, priority, &memory_usage); bool memory_usage_is_within_limit = !memory_usage.Exceeds(scheduled_tile_memory_limit); @@ -567,7 +567,7 @@ void TileManager::AssignGpuMemoryToTiles( // didn't reduce memory. This ensures that we always release as many resources // as possible to stay within the memory limit. eviction_priority_queue = FreeTileResourcesUntilUsageIsWithinLimit( - eviction_priority_queue.Pass(), hard_memory_limit, &memory_usage); + std::move(eviction_priority_queue), hard_memory_limit, &memory_usage); UMA_HISTOGRAM_BOOLEAN("TileManager.ExceededMemoryBudget", !had_enough_memory_to_schedule_tiles_needed_now); diff --git a/cc/tiles/tile_manager_perftest.cc b/cc/tiles/tile_manager_perftest.cc index 6e7bed3..9bc3c18 100644 --- a/cc/tiles/tile_manager_perftest.cc +++ b/cc/tiles/tile_manager_perftest.cc @@ -172,7 +172,7 @@ class TileManagerPerfTest : public testing::Test { raster_source); pending_layer->SetDrawsContent(true); pending_layer->SetHasRenderSurface(true); - pending_tree->SetRootLayer(pending_layer.Pass()); + pending_tree->SetRootLayer(std::move(pending_layer)); pending_root_layer_ = static_cast<FakePictureLayerImpl*>( host_impl_.pending_tree()->LayerById(id_)); @@ -360,7 +360,7 @@ class TileManagerPerfTest : public testing::Test { layer->SetBounds(layer_bounds); layer->SetDrawsContent(true); layers.push_back(layer.get()); - pending_root_layer_->AddChild(layer.Pass()); + pending_root_layer_->AddChild(std::move(layer)); ++next_id; } diff --git a/cc/tiles/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc index 347aa6d..5ca49b6 100644 --- a/cc/tiles/tile_manager_unittest.cc +++ b/cc/tiles/tile_manager_unittest.cc @@ -140,7 +140,7 @@ class TileManagerTilePriorityQueueTest : public testing::Test { } // The bounds() just mirror the raster source size. pending_layer->SetBounds(pending_layer->raster_source()->GetSize()); - pending_tree->SetRootLayer(pending_layer.Pass()); + pending_tree->SetRootLayer(std::move(pending_layer)); pending_layer_ = static_cast<FakePictureLayerImpl*>( host_impl_.pending_tree()->LayerById(id_)); @@ -614,7 +614,7 @@ TEST_F(TileManagerTilePriorityQueueTest, ActivationComesBeforeEventually) { host_impl_.pending_tree(), id_ + 1, pending_raster_source); FakePictureLayerImpl* pending_child_raw = pending_child.get(); pending_child_raw->SetDrawsContent(true); - pending_layer_->AddChild(pending_child.Pass()); + pending_layer_->AddChild(std::move(pending_child)); // Set a small viewport, so we have soon and eventually tiles. host_impl_.SetViewportSize(gfx::Size(200, 200)); @@ -835,7 +835,7 @@ TEST_F(TileManagerTilePriorityQueueTest, scoped_ptr<FakePictureLayerImpl> pending_child = FakePictureLayerImpl::CreateWithRasterSource(host_impl_.pending_tree(), 2, pending_raster_source); - pending_layer_->AddChild(pending_child.Pass()); + pending_layer_->AddChild(std::move(pending_child)); FakePictureLayerImpl* pending_child_layer = static_cast<FakePictureLayerImpl*>(pending_layer_->children()[0].get()); @@ -952,7 +952,7 @@ TEST_F(TileManagerTilePriorityQueueTest, FakePictureLayerImpl::CreateWithRasterSource(host_impl_.pending_tree(), 2, pending_raster_source); FakePictureLayerImpl* pending_child_layer = pending_child.get(); - pending_layer_->AddChild(pending_child.Pass()); + pending_layer_->AddChild(std::move(pending_child)); // Create a fully transparent child layer so that its tile priorities are not // considered to be valid. @@ -1053,7 +1053,7 @@ TEST_F(TileManagerTilePriorityQueueTest, RasterTilePriorityQueueEmptyLayers) { FakePictureLayerImpl::Create(host_impl_.pending_tree(), id_ + i); pending_layer->SetDrawsContent(true); pending_layer->set_has_valid_tile_priorities(true); - pending_layer_->AddChild(pending_layer.Pass()); + pending_layer_->AddChild(std::move(pending_layer)); } queue = host_impl_.BuildRasterQueue(SAME_PRIORITY_FOR_BOTH_TREES, @@ -1100,7 +1100,7 @@ TEST_F(TileManagerTilePriorityQueueTest, EvictionTilePriorityQueueEmptyLayers) { FakePictureLayerImpl::Create(host_impl_.pending_tree(), id_ + i); pending_layer->SetDrawsContent(true); pending_layer->set_has_valid_tile_priorities(true); - pending_layer_->AddChild(pending_layer.Pass()); + pending_layer_->AddChild(std::move(pending_layer)); } scoped_ptr<EvictionTilePriorityQueue> queue( @@ -1509,7 +1509,7 @@ class TileManagerTest : public testing::Test { } // The bounds() just mirror the raster source size. pending_layer->SetBounds(pending_layer->raster_source()->GetSize()); - pending_tree->SetRootLayer(pending_layer.Pass()); + pending_tree->SetRootLayer(std::move(pending_layer)); // Add tilings/tiles for the layer. bool update_lcd_text = false; @@ -1754,7 +1754,7 @@ TEST_F(PartialRasterTileManagerTest, CancelledTasksHaveNoContentId) { // The bounds() just mirror the raster source size. pending_layer->SetBounds(pending_layer->raster_source()->GetSize()); - pending_tree->SetRootLayer(pending_layer.Pass()); + pending_tree->SetRootLayer(std::move(pending_layer)); // Add tilings/tiles for the layer. host_impl_->pending_tree()->BuildPropertyTreesForTesting(); @@ -1846,7 +1846,7 @@ void RunPartialRasterCheck(scoped_ptr<LayerTreeHostImpl> host_impl, // The bounds() just mirror the raster source size. pending_layer->SetBounds(pending_layer->raster_source()->GetSize()); - pending_tree->SetRootLayer(pending_layer.Pass()); + pending_tree->SetRootLayer(std::move(pending_layer)); // Add tilings/tiles for the layer. host_impl->pending_tree()->BuildPropertyTreesForTesting(); @@ -1871,13 +1871,15 @@ void RunPartialRasterCheck(scoped_ptr<LayerTreeHostImpl> host_impl, // Ensures that the tile manager successfully reuses tiles when partial // raster is enabled. TEST_F(PartialRasterTileManagerTest, PartialRasterSuccessfullyEnabled) { - RunPartialRasterCheck(host_impl_.Pass(), true /* partial_raster_enabled */); + RunPartialRasterCheck(std::move(host_impl_), + true /* partial_raster_enabled */); } // Ensures that the tile manager does not attempt to reuse tiles when partial // raster is disabled. TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { - RunPartialRasterCheck(host_impl_.Pass(), false /* partial_raster_enabled */); + RunPartialRasterCheck(std::move(host_impl_), + false /* partial_raster_enabled */); } } // namespace |