| Index: cc/surfaces/display_unittest.cc
|
| diff --git a/cc/surfaces/display_unittest.cc b/cc/surfaces/display_unittest.cc
|
| index 7b82d961312394cf82eff0cde63c3fb2654afa7a..a92496c75214ae5070f0d08a1891d2343f81432e 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);
|
| }
|
|
|