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

Side by Side Diff: cc/surfaces/surface_display_output_surface_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 unified diff | Download patch
« no previous file with comments | « cc/surfaces/surface_display_output_surface.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/surfaces/surface_display_output_surface.h" 5 #include "cc/surfaces/surface_display_output_surface.h"
6 6
7 #include "cc/surfaces/onscreen_display_client.h" 7 #include "cc/surfaces/onscreen_display_client.h"
8 #include "cc/surfaces/surface_id_allocator.h" 8 #include "cc/surfaces/surface_id_allocator.h"
9 #include "cc/surfaces/surface_manager.h" 9 #include "cc/surfaces/surface_manager.h"
10 #include "cc/test/fake_output_surface.h" 10 #include "cc/test/fake_output_surface.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 ~SurfaceDisplayOutputSurfaceTest() override {} 78 ~SurfaceDisplayOutputSurfaceTest() override {}
79 79
80 void SwapBuffersWithDamage(const gfx::Rect& damage_rect_) { 80 void SwapBuffersWithDamage(const gfx::Rect& damage_rect_) {
81 scoped_ptr<RenderPass> render_pass(RenderPass::Create()); 81 scoped_ptr<RenderPass> render_pass(RenderPass::Create());
82 render_pass->SetNew(RenderPassId(1, 1), display_rect_, damage_rect_, 82 render_pass->SetNew(RenderPassId(1, 1), display_rect_, damage_rect_,
83 gfx::Transform()); 83 gfx::Transform());
84 84
85 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); 85 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
86 frame_data->render_pass_list.push_back(render_pass.Pass()); 86 frame_data->render_pass_list.push_back(std::move(render_pass));
87 87
88 CompositorFrame frame; 88 CompositorFrame frame;
89 frame.delegated_frame_data = frame_data.Pass(); 89 frame.delegated_frame_data = std::move(frame_data);
90 90
91 surface_display_output_surface_.SwapBuffers(&frame); 91 surface_display_output_surface_.SwapBuffers(&frame);
92 } 92 }
93 93
94 void SetUp() override { 94 void SetUp() override {
95 // Draw the first frame to start in an "unlocked" state. 95 // Draw the first frame to start in an "unlocked" state.
96 SwapBuffersWithDamage(display_rect_); 96 SwapBuffersWithDamage(display_rect_);
97 97
98 EXPECT_EQ(0u, output_surface_->num_sent_frames()); 98 EXPECT_EQ(0u, output_surface_->num_sent_frames());
99 task_runner_->RunUntilIdle(); 99 task_runner_->RunUntilIdle();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 EXPECT_EQ(1u, output_surface_->num_sent_frames()); 157 EXPECT_EQ(1u, output_surface_->num_sent_frames());
158 158
159 SwapBuffersWithDamage(gfx::Rect()); 159 SwapBuffersWithDamage(gfx::Rect());
160 EXPECT_EQ(1u, output_surface_->num_sent_frames()); 160 EXPECT_EQ(1u, output_surface_->num_sent_frames());
161 task_runner_->RunUntilIdle(); 161 task_runner_->RunUntilIdle();
162 EXPECT_EQ(1u, output_surface_->num_sent_frames()); 162 EXPECT_EQ(1u, output_surface_->num_sent_frames());
163 } 163 }
164 164
165 } // namespace 165 } // namespace
166 } // namespace cc 166 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_display_output_surface.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698