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

Side by Side Diff: cc/trees/layer_tree_host_pixeltest_tiles.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/trees/layer_tree_host_pixeltest_readback.cc ('k') | cc/trees/layer_tree_host_unittest.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/layers/content_layer_client.h" 5 #include "cc/layers/content_layer_client.h"
6 #include "cc/layers/picture_layer.h" 6 #include "cc/layers/picture_layer.h"
7 #include "cc/output/copy_output_request.h" 7 #include "cc/output/copy_output_request.h"
8 #include "cc/playback/display_item_list.h" 8 #include "cc/playback/display_item_list.h"
9 #include "cc/playback/display_item_list_settings.h" 9 #include "cc/playback/display_item_list_settings.h"
10 #include "cc/playback/drawing_display_item.h" 10 #include "cc/playback/drawing_display_item.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 paint.setColor(SK_ColorBLUE); 128 paint.setColor(SK_ColorBLUE);
129 canvas->drawRect(gfx::RectToSkRect(blue_rect), paint); 129 canvas->drawRect(gfx::RectToSkRect(blue_rect), paint);
130 paint.setColor(SK_ColorYELLOW); 130 paint.setColor(SK_ColorYELLOW);
131 canvas->drawRect(gfx::RectToSkRect(yellow_rect), paint); 131 canvas->drawRect(gfx::RectToSkRect(yellow_rect), paint);
132 132
133 skia::RefPtr<SkPicture> picture = 133 skia::RefPtr<SkPicture> picture =
134 skia::AdoptRef(recorder.endRecordingAsPicture()); 134 skia::AdoptRef(recorder.endRecordingAsPicture());
135 135
136 auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(); 136 auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>();
137 item->SetNew(picture.Pass()); 137 item->SetNew(std::move(picture));
138 138
139 display_list->Finalize(); 139 display_list->Finalize();
140 return display_list; 140 return display_list;
141 } 141 }
142 142
143 bool FillsBoundsCompletely() const override { return true; } 143 bool FillsBoundsCompletely() const override { return true; }
144 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; } 144 size_t GetApproximateUnsharedMemoryUsage() const override { return 0; }
145 145
146 void set_blue_top(bool b) { blue_top_ = b; } 146 void set_blue_top(bool b) { blue_top_ = b; }
147 147
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 FullRaster_SingleThread_GpuRaster) { 236 FullRaster_SingleThread_GpuRaster) {
237 RunRasterPixelTest( 237 RunRasterPixelTest(
238 false, FULL_GPU, picture_layer_, 238 false, FULL_GPU, picture_layer_,
239 base::FilePath(FILE_PATH_LITERAL("blue_yellow_flipped.png"))); 239 base::FilePath(FILE_PATH_LITERAL("blue_yellow_flipped.png")));
240 } 240 }
241 241
242 } // namespace 242 } // namespace
243 } // namespace cc 243 } // namespace cc
244 244
245 #endif // !defined(OS_ANDROID) 245 #endif // !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_readback.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698