Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4160)

Unified Diff: cc/surfaces/surface_factory_unittest.cc

Issue 1455023002: cc: Replace Pass() with std::move() in some subdirs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-cc
Patch Set: pass-cc2: . Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/surface_factory.cc ('k') | cc/surfaces/surface_hittest_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_factory_unittest.cc
diff --git a/cc/surfaces/surface_factory_unittest.cc b/cc/surfaces/surface_factory_unittest.cc
index 9e7bc153d36af0fe09b3d7faec642894c373b775..fa05c2e93782bc357033857952717a0224e8022a 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -69,8 +69,8 @@ class SurfaceFactoryTest : public testing::Test {
frame_data->resource_list.push_back(resource);
}
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
- frame->delegated_frame_data = frame_data.Pass();
- factory_->SubmitCompositorFrame(surface_id_, frame.Pass(),
+ frame->delegated_frame_data = std::move(frame_data);
+ factory_->SubmitCompositorFrame(surface_id_, std::move(frame),
SurfaceFactory::DrawCallback());
}
@@ -389,7 +389,7 @@ TEST_F(SurfaceFactoryTest, BlankNoIndexIncrement) {
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data.reset(new DelegatedFrameData);
- factory_->SubmitCompositorFrame(surface_id, frame.Pass(),
+ factory_->SubmitCompositorFrame(surface_id, std::move(frame),
SurfaceFactory::DrawCallback());
EXPECT_EQ(2, surface->frame_index());
factory_->Destroy(surface_id);
@@ -413,12 +413,12 @@ TEST_F(SurfaceFactoryTest, DestroyAll) {
resource.mailbox_holder.texture_target = GL_TEXTURE_2D;
frame_data->resource_list.push_back(resource);
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
- frame->delegated_frame_data = frame_data.Pass();
+ frame->delegated_frame_data = std::move(frame_data);
uint32 execute_count = 0;
SurfaceDrawStatus drawn = SurfaceDrawStatus::DRAW_SKIPPED;
factory_->SubmitCompositorFrame(
- id, frame.Pass(), base::Bind(&DrawCallback, &execute_count, &drawn));
+ id, std::move(frame), base::Bind(&DrawCallback, &execute_count, &drawn));
surface_id_ = SurfaceId();
factory_->DestroyAll();
@@ -441,9 +441,9 @@ TEST_F(SurfaceFactoryTest, DestroySequence) {
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->metadata.satisfies_sequences.push_back(6);
frame->metadata.satisfies_sequences.push_back(4);
- frame->delegated_frame_data = frame_data.Pass();
+ frame->delegated_frame_data = std::move(frame_data);
DCHECK(manager_.GetSurfaceForId(id2));
- factory_->SubmitCompositorFrame(surface_id_, frame.Pass(),
+ factory_->SubmitCompositorFrame(surface_id_, std::move(frame),
SurfaceFactory::DrawCallback());
DCHECK(!manager_.GetSurfaceForId(id2));
@@ -492,10 +492,10 @@ TEST_F(SurfaceFactoryTest, DestroyCycle) {
scoped_ptr<RenderPass> render_pass(RenderPass::Create());
render_pass->referenced_surfaces.push_back(surface_id_);
scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
- frame_data->render_pass_list.push_back(render_pass.Pass());
+ frame_data->render_pass_list.push_back(std::move(render_pass));
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
- frame->delegated_frame_data = frame_data.Pass();
- factory_->SubmitCompositorFrame(id2, frame.Pass(),
+ frame->delegated_frame_data = std::move(frame_data);
+ factory_->SubmitCompositorFrame(id2, std::move(frame),
SurfaceFactory::DrawCallback());
}
factory_->Destroy(id2);
@@ -505,10 +505,10 @@ TEST_F(SurfaceFactoryTest, DestroyCycle) {
scoped_ptr<RenderPass> render_pass(RenderPass::Create());
render_pass->referenced_surfaces.push_back(id2);
scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
- frame_data->render_pass_list.push_back(render_pass.Pass());
+ frame_data->render_pass_list.push_back(std::move(render_pass));
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
- frame->delegated_frame_data = frame_data.Pass();
- factory_->SubmitCompositorFrame(surface_id_, frame.Pass(),
+ frame->delegated_frame_data = std::move(frame_data);
+ factory_->SubmitCompositorFrame(surface_id_, std::move(frame),
SurfaceFactory::DrawCallback());
}
factory_->Destroy(surface_id_);
« no previous file with comments | « cc/surfaces/surface_factory.cc ('k') | cc/surfaces/surface_hittest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698