diff options
author | danakj <danakj@chromium.org> | 2015-11-18 12:39:10 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-18 20:39:58 +0000 |
commit | a04855af140e24ed3ec3f59da178837b3d32d9c4 (patch) | |
tree | a71f13ff7f62616eaf173d13861472f06a50fcf2 /cc/surfaces/display_unittest.cc | |
parent | 904f19454a71c733205d9e68bc8faa93a6fdce3e (diff) | |
download | chromium_src-a04855af140e24ed3ec3f59da178837b3d32d9c4.zip chromium_src-a04855af140e24ed3ec3f59da178837b3d32d9c4.tar.gz chromium_src-a04855af140e24ed3ec3f59da178837b3d32d9c4.tar.bz2 |
cc: Replace Pass() with std::move() in some subdirs.
This hits the following:
cc/layers/
cc/output/
cc/quads/
cc/resources/
cc/scheduler/
cc/surfaces/
cc/trees/
R=enne, vmpstr
BUG=557422
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1455023002
Cr-Commit-Position: refs/heads/master@{#360405}
Diffstat (limited to 'cc/surfaces/display_unittest.cc')
-rw-r--r-- | cc/surfaces/display_unittest.cc | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/cc/surfaces/display_unittest.cc b/cc/surfaces/display_unittest.cc index 7b82d96..a92496c 100644 --- a/cc/surfaces/display_unittest.cc +++ b/cc/surfaces/display_unittest.cc @@ -62,12 +62,13 @@ class DisplayTest : public testing::Test { void SetUpContext(scoped_ptr<TestWebGraphicsContext3D> context) { if (context) { output_surface_ = FakeOutputSurface::Create3d( - TestContextProvider::Create(context.Pass())); + TestContextProvider::Create(std::move(context))); } else { scoped_ptr<TestSoftwareOutputDevice> output_device( new TestSoftwareOutputDevice); software_output_device_ = output_device.get(); - output_surface_ = FakeOutputSurface::CreateSoftware(output_device.Pass()); + output_surface_ = + FakeOutputSurface::CreateSoftware(std::move(output_device)); } shared_bitmap_manager_.reset(new TestSharedBitmapManager); output_surface_ptr_ = output_surface_.get(); @@ -78,9 +79,9 @@ class DisplayTest : public testing::Test { pass_list->swap(frame_data->render_pass_list); scoped_ptr<CompositorFrame> frame(new CompositorFrame); - frame->delegated_frame_data = frame_data.Pass(); + frame->delegated_frame_data = std::move(frame_data); - factory_.SubmitCompositorFrame(surface_id, frame.Pass(), + factory_.SubmitCompositorFrame(surface_id, std::move(frame), SurfaceFactory::DrawCallback()); } @@ -160,7 +161,7 @@ TEST_F(DisplayTest, DisplayAsSurfaceAggregatorClient) { TestDisplayScheduler scheduler(&display, &fake_begin_frame_source_, task_runner_.get()); - display.Initialize(output_surface_.Pass(), &scheduler); + display.Initialize(std::move(output_surface_), &scheduler); SurfaceId surface_id(6); factory_.Create(surface_id); @@ -185,7 +186,7 @@ TEST_F(DisplayTest, DisplayDamaged) { TestDisplayScheduler scheduler(&display, &fake_begin_frame_source_, task_runner_.get()); - display.Initialize(output_surface_.Pass(), &scheduler); + display.Initialize(std::move(output_surface_), &scheduler); SurfaceId surface_id(7u); EXPECT_FALSE(scheduler.damaged); @@ -209,7 +210,7 @@ TEST_F(DisplayTest, DisplayDamaged) { pass->output_rect = gfx::Rect(0, 0, 100, 100); pass->damage_rect = gfx::Rect(10, 10, 1, 1); pass->id = RenderPassId(1, 1); - pass_list.push_back(pass.Pass()); + pass_list.push_back(std::move(pass)); scheduler.ResetDamageForTest(); SubmitCompositorFrame(&pass_list, surface_id); @@ -233,7 +234,7 @@ TEST_F(DisplayTest, DisplayDamaged) { pass->damage_rect = gfx::Rect(10, 10, 1, 1); pass->id = RenderPassId(1, 1); - pass_list.push_back(pass.Pass()); + pass_list.push_back(std::move(pass)); scheduler.ResetDamageForTest(); SubmitCompositorFrame(&pass_list, surface_id); EXPECT_TRUE(scheduler.damaged); @@ -256,7 +257,7 @@ TEST_F(DisplayTest, DisplayDamaged) { pass->damage_rect = gfx::Rect(10, 10, 0, 0); pass->id = RenderPassId(1, 1); - pass_list.push_back(pass.Pass()); + pass_list.push_back(std::move(pass)); scheduler.ResetDamageForTest(); SubmitCompositorFrame(&pass_list, surface_id); EXPECT_TRUE(scheduler.damaged); @@ -276,7 +277,7 @@ TEST_F(DisplayTest, DisplayDamaged) { pass->damage_rect = gfx::Rect(10, 10, 10, 10); pass->id = RenderPassId(1, 1); - pass_list.push_back(pass.Pass()); + pass_list.push_back(std::move(pass)); scheduler.ResetDamageForTest(); SubmitCompositorFrame(&pass_list, surface_id); EXPECT_TRUE(scheduler.damaged); @@ -296,7 +297,7 @@ TEST_F(DisplayTest, DisplayDamaged) { pass->damage_rect = gfx::Rect(10, 10, 0, 0); pass->id = RenderPassId(1, 1); - pass_list.push_back(pass.Pass()); + pass_list.push_back(std::move(pass)); scheduler.ResetDamageForTest(); SubmitCompositorFrame(&pass_list, surface_id); EXPECT_TRUE(scheduler.damaged); @@ -321,7 +322,7 @@ TEST_F(DisplayTest, DisplayDamaged) { base::Bind(&CopyCallback, ©_called))); pass->id = RenderPassId(1, 1); - pass_list.push_back(pass.Pass()); + pass_list.push_back(std::move(pass)); scheduler.ResetDamageForTest(); SubmitCompositorFrame(&pass_list, surface_id); EXPECT_TRUE(scheduler.damaged); @@ -342,16 +343,16 @@ TEST_F(DisplayTest, DisplayDamaged) { pass->damage_rect = gfx::Rect(10, 10, 0, 0); pass->id = RenderPassId(1, 1); - pass_list.push_back(pass.Pass()); + pass_list.push_back(std::move(pass)); scheduler.ResetDamageForTest(); scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); pass_list.swap(frame_data->render_pass_list); scoped_ptr<CompositorFrame> frame(new CompositorFrame); - frame->delegated_frame_data = frame_data.Pass(); + frame->delegated_frame_data = std::move(frame_data); frame->metadata.latency_info.push_back(ui::LatencyInfo()); - factory_.SubmitCompositorFrame(surface_id, frame.Pass(), + factory_.SubmitCompositorFrame(surface_id, std::move(frame), SurfaceFactory::DrawCallback()); EXPECT_TRUE(scheduler.damaged); EXPECT_FALSE(scheduler.display_resized_); @@ -375,15 +376,15 @@ TEST_F(DisplayTest, DisplayDamaged) { pass->damage_rect = gfx::Rect(10, 10, 10, 10); pass->id = RenderPassId(1, 1); - pass_list.push_back(pass.Pass()); + pass_list.push_back(std::move(pass)); scheduler.ResetDamageForTest(); scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); pass_list.swap(frame_data->render_pass_list); scoped_ptr<CompositorFrame> frame(new CompositorFrame); - frame->delegated_frame_data = frame_data.Pass(); + frame->delegated_frame_data = std::move(frame_data); - factory_.SubmitCompositorFrame(surface_id, frame.Pass(), + factory_.SubmitCompositorFrame(surface_id, std::move(frame), SurfaceFactory::DrawCallback()); EXPECT_TRUE(scheduler.damaged); EXPECT_FALSE(scheduler.display_resized_); @@ -406,7 +407,7 @@ class MockedContext : public TestWebGraphicsContext3D { TEST_F(DisplayTest, Finish) { scoped_ptr<MockedContext> context(new MockedContext()); MockedContext* context_ptr = context.get(); - SetUpContext(context.Pass()); + SetUpContext(std::move(context)); EXPECT_CALL(*context_ptr, shallowFinishCHROMIUM()).Times(0); TestDisplayClient client; @@ -418,7 +419,7 @@ TEST_F(DisplayTest, Finish) { TestDisplayScheduler scheduler(&display, &fake_begin_frame_source_, task_runner_.get()); - display.Initialize(output_surface_.Pass(), &scheduler); + display.Initialize(std::move(output_surface_), &scheduler); SurfaceId surface_id(7u); display.SetSurfaceId(surface_id, 1.f); @@ -432,7 +433,7 @@ TEST_F(DisplayTest, Finish) { pass->output_rect = gfx::Rect(0, 0, 100, 100); pass->damage_rect = gfx::Rect(10, 10, 1, 1); pass->id = RenderPassId(1, 1); - pass_list.push_back(pass.Pass()); + pass_list.push_back(std::move(pass)); SubmitCompositorFrame(&pass_list, surface_id); } @@ -458,7 +459,7 @@ TEST_F(DisplayTest, Finish) { pass->output_rect = gfx::Rect(0, 0, 200, 200); pass->damage_rect = gfx::Rect(10, 10, 1, 1); pass->id = RenderPassId(1, 1); - pass_list.push_back(pass.Pass()); + pass_list.push_back(std::move(pass)); SubmitCompositorFrame(&pass_list, surface_id); } |