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

Unified Diff: cc/trees/layer_tree_host_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/trees/layer_tree_host_pixeltest_tiles.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 5e4e1ef6065011595233cd549ed1d0e0f9c037d2..7d2dbef7115ef7ca36a6117790a3b7b231e475c7 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -441,7 +441,7 @@ class LayerTreeHostFreeWorkerContextResourcesTest : public LayerTreeHostTest {
SetWorkerContextShouldAggressivelyFreeResources(true))
.After(visibility_true)
.WillOnce(testing::Invoke([this](bool is_visible) { EndTest(); }));
- return output_surface.Pass();
+ return std::move(output_surface);
}
void InitializeSettings(LayerTreeSettings* settings) override {
@@ -1217,12 +1217,12 @@ class LayerTreeHostTestDamageWithScale : public LayerTreeHostTest {
scoped_ptr<FakeDisplayListRecordingSource> recording(
new FakeDisplayListRecordingSource);
root_layer_ = FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &client_, recording.Pass());
+ layer_settings(), &client_, std::move(recording));
root_layer_->SetBounds(gfx::Size(50, 50));
recording.reset(new FakeDisplayListRecordingSource);
child_layer_ = FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &client_, recording.Pass());
+ layer_settings(), &client_, std::move(recording));
child_layer_->SetBounds(gfx::Size(25, 25));
child_layer_->SetIsDrawable(true);
child_layer_->SetContentsOpaque(true);
@@ -2246,9 +2246,10 @@ class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest {
mock_context_ = mock_context_owned.get();
if (delegating_renderer())
- return FakeOutputSurface::CreateDelegating3d(mock_context_owned.Pass());
+ return FakeOutputSurface::CreateDelegating3d(
+ std::move(mock_context_owned));
else
- return FakeOutputSurface::Create3d(mock_context_owned.Pass());
+ return FakeOutputSurface::Create3d(std::move(mock_context_owned));
}
void SetupTree() override {
@@ -3850,7 +3851,7 @@ class LayerTreeHostTestSetMemoryPolicyOnLostOutputSurface
: first_output_surface_memory_limit_,
gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE,
ManagedMemoryPolicy::kDefaultNumResourcesLimit)));
- return output_surface.Pass();
+ return output_surface;
}
void SetupTree() override {
@@ -4015,7 +4016,7 @@ class LayerTreeHostTestBreakSwapPromise : public LayerTreeHostTest {
ASSERT_LE(commit_count_, 2);
scoped_ptr<SwapPromise> swap_promise(
new TestSwapPromise(&swap_promise_result_[commit_count_]));
- layer_tree_host()->QueueSwapPromise(swap_promise.Pass());
+ layer_tree_host()->QueueSwapPromise(std::move(swap_promise));
}
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
@@ -4202,7 +4203,7 @@ class LayerTreeHostTestBreakSwapPromiseForVisibility
layer_tree_host()->SetVisible(false);
scoped_ptr<SwapPromise> swap_promise(
new TestSwapPromise(&swap_promise_result_));
- layer_tree_host()->QueueSwapPromise(swap_promise.Pass());
+ layer_tree_host()->QueueSwapPromise(std::move(swap_promise));
}
void ScheduledActionWillSendBeginMainFrame() override {
@@ -4246,7 +4247,7 @@ class LayerTreeHostTestBreakSwapPromiseForContext : public LayerTreeHostTest {
layer_tree_host()->DidLoseOutputSurface();
scoped_ptr<SwapPromise> swap_promise(
new TestSwapPromise(&swap_promise_result_));
- layer_tree_host()->QueueSwapPromise(swap_promise.Pass());
+ layer_tree_host()->QueueSwapPromise(std::move(swap_promise));
}
void ScheduledActionWillSendBeginMainFrame() override {
@@ -4426,7 +4427,7 @@ class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest {
scoped_refptr<FakePictureLayer> layer =
FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &layer_client_, recording_source.Pass());
+ layer_settings(), &layer_client_, std::move(recording_source));
layer_ = layer.get();
layer->SetBounds(gfx::Size(10, 10));
layer->SetIsDrawable(true);
@@ -4481,7 +4482,7 @@ class LayerTreeHostTestEmptyLayerGpuRasterization : public LayerTreeHostTest {
scoped_refptr<FakePictureLayer> layer =
FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &layer_client_, recording_source.Pass());
+ layer_settings(), &layer_client_, std::move(recording_source));
layer_ = layer.get();
layer->SetBounds(gfx::Size());
layer->SetIsDrawable(true);
@@ -4538,7 +4539,7 @@ class LayerTreeHostTestGpuRasterizationEnabled : public LayerTreeHostTest {
scoped_refptr<FakePictureLayer> layer =
FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &layer_client_, recording_source.Pass());
+ layer_settings(), &layer_client_, std::move(recording_source));
layer_ = layer.get();
layer->SetBounds(gfx::Size(10, 10));
layer->SetIsDrawable(true);
@@ -4607,7 +4608,7 @@ class LayerTreeHostTestGpuRasterizationForced : public LayerTreeHostTest {
scoped_refptr<FakePictureLayer> layer =
FakePictureLayer::CreateWithRecordingSource(
- layer_settings(), &layer_client_, recording_source.Pass());
+ layer_settings(), &layer_client_, std::move(recording_source));
layer_ = layer.get();
layer->SetBounds(gfx::Size(10, 10));
@@ -4921,20 +4922,20 @@ class LayerTreeHostTestSynchronousCompositeSwapPromise
// Successful composite.
scoped_ptr<SwapPromise> swap_promise0(
new TestSwapPromise(&swap_promise_result_[0]));
- layer_tree_host()->QueueSwapPromise(swap_promise0.Pass());
+ layer_tree_host()->QueueSwapPromise(std::move(swap_promise0));
layer_tree_host()->Composite(base::TimeTicks::Now());
// Fail to swap (no damage).
scoped_ptr<SwapPromise> swap_promise1(
new TestSwapPromise(&swap_promise_result_[1]));
- layer_tree_host()->QueueSwapPromise(swap_promise1.Pass());
+ layer_tree_host()->QueueSwapPromise(std::move(swap_promise1));
layer_tree_host()->SetNeedsCommit();
layer_tree_host()->Composite(base::TimeTicks::Now());
// Fail to draw (not visible).
scoped_ptr<SwapPromise> swap_promise2(
new TestSwapPromise(&swap_promise_result_[2]));
- layer_tree_host()->QueueSwapPromise(swap_promise2.Pass());
+ layer_tree_host()->QueueSwapPromise(std::move(swap_promise2));
layer_tree_host()->SetNeedsDisplayOnAllLayers();
layer_tree_host()->SetVisible(false);
layer_tree_host()->Composite(base::TimeTicks::Now());
@@ -5052,7 +5053,7 @@ class LayerTreeHostTestCrispUpAfterPinchEnds : public LayerTreeHostTest {
recording->SetPlaybackAllowedEvent(&playback_allowed_event_);
scoped_refptr<FakePictureLayer> layer =
FakePictureLayer::CreateWithRecordingSource(layer_settings(), &client_,
- recording.Pass());
+ std::move(recording));
layer->SetBounds(gfx::Size(500, 500));
layer->SetContentsOpaque(true);
// Avoid LCD text on the layer so we don't cause extra commits when we
@@ -5226,9 +5227,9 @@ class LayerTreeHostTestCrispUpAfterPinchEndsWithOneCopy
#endif
if (delegating_renderer())
- return FakeOutputSurface::CreateDelegating3d(context3d.Pass());
+ return FakeOutputSurface::CreateDelegating3d(std::move(context3d));
else
- return FakeOutputSurface::Create3d(context3d.Pass());
+ return FakeOutputSurface::Create3d(std::move(context3d));
}
};
@@ -5254,7 +5255,7 @@ class RasterizeWithGpuRasterizationCreatesResources : public LayerTreeHostTest {
new FakeDisplayListRecordingSource);
scoped_refptr<FakePictureLayer> layer =
FakePictureLayer::CreateWithRecordingSource(layer_settings(), &client_,
- recording.Pass());
+ std::move(recording));
layer->SetBounds(gfx::Size(500, 500));
layer->SetContentsOpaque(true);
root->AddChild(layer);
@@ -5295,7 +5296,7 @@ class GpuRasterizationRasterizesBorderTiles : public LayerTreeHostTest {
new FakeDisplayListRecordingSource);
scoped_refptr<FakePictureLayer> root =
FakePictureLayer::CreateWithRecordingSource(layer_settings(), &client_,
- recording.Pass());
+ std::move(recording));
root->SetBounds(gfx::Size(10000, 10000));
root->SetContentsOpaque(true);
@@ -5348,7 +5349,7 @@ class LayerTreeHostTestContinuousDrawWhenCreatingVisibleTiles
recording->SetPlaybackAllowedEvent(&playback_allowed_event_);
scoped_refptr<FakePictureLayer> layer =
FakePictureLayer::CreateWithRecordingSource(layer_settings(), &client_,
- recording.Pass());
+ std::move(recording));
layer->SetBounds(gfx::Size(500, 500));
layer->SetContentsOpaque(true);
// Avoid LCD text on the layer so we don't cause extra commits when we
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_tiles.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698