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

Side by Side Diff: cc/layers/picture_layer_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/layers/picture_layer_impl_unittest.cc ('k') | cc/layers/render_surface_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/layers/picture_layer.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "cc/layers/content_layer_client.h" 8 #include "cc/layers/content_layer_client.h"
9 #include "cc/layers/picture_layer_impl.h" 9 #include "cc/layers/picture_layer_impl.h"
10 #include "cc/playback/display_item_list_settings.h" 10 #include "cc/playback/display_item_list_settings.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 TEST(PictureLayerTest, SuitableForGpuRasterization) { 76 TEST(PictureLayerTest, SuitableForGpuRasterization) {
77 scoped_ptr<FakeDisplayListRecordingSource> recording_source_owned( 77 scoped_ptr<FakeDisplayListRecordingSource> recording_source_owned(
78 new FakeDisplayListRecordingSource); 78 new FakeDisplayListRecordingSource);
79 FakeDisplayListRecordingSource* recording_source = 79 FakeDisplayListRecordingSource* recording_source =
80 recording_source_owned.get(); 80 recording_source_owned.get();
81 81
82 MockContentLayerClient client; 82 MockContentLayerClient client;
83 scoped_refptr<FakePictureLayer> layer = 83 scoped_refptr<FakePictureLayer> layer =
84 FakePictureLayer::CreateWithRecordingSource( 84 FakePictureLayer::CreateWithRecordingSource(
85 LayerSettings(), &client, recording_source_owned.Pass()); 85 LayerSettings(), &client, std::move(recording_source_owned));
86 86
87 FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); 87 FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D);
88 TestTaskGraphRunner task_graph_runner; 88 TestTaskGraphRunner task_graph_runner;
89 scoped_ptr<FakeLayerTreeHost> host = 89 scoped_ptr<FakeLayerTreeHost> host =
90 FakeLayerTreeHost::Create(&host_client, &task_graph_runner); 90 FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
91 host->SetRootLayer(layer); 91 host->SetRootLayer(layer);
92 92
93 // Update layers to initialize the recording source. 93 // Update layers to initialize the recording source.
94 gfx::Size layer_bounds(200, 200); 94 gfx::Size layer_bounds(200, 200);
95 gfx::Rect layer_rect(layer_bounds); 95 gfx::Rect layer_rect(layer_bounds);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Do a main frame, record the picture layers. The frame number has changed 165 // Do a main frame, record the picture layers. The frame number has changed
166 // non-monotonically. 166 // non-monotonically.
167 layer->SetNeedsDisplay(); 167 layer->SetNeedsDisplay();
168 host2->Composite(base::TimeTicks::Now()); 168 host2->Composite(base::TimeTicks::Now());
169 EXPECT_EQ(3, layer->update_count()); 169 EXPECT_EQ(3, layer->update_count());
170 EXPECT_EQ(1, host2->source_frame_number()); 170 EXPECT_EQ(1, host2->source_frame_number());
171 } 171 }
172 172
173 } // namespace 173 } // namespace
174 } // namespace cc 174 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/layers/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698