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

Side by Side Diff: cc/trees/layer_tree_host_pixeltest_tiles.cc

Issue 1869753003: Replace many skia::RefPtr with sk_sp<> in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Florin's nits Created 4 years, 7 months 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
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "cc/layers/content_layer_client.h" 7 #include "cc/layers/content_layer_client.h"
8 #include "cc/layers/picture_layer.h" 8 #include "cc/layers/picture_layer.h"
9 #include "cc/output/copy_output_request.h" 9 #include "cc/output/copy_output_request.h"
10 #include "cc/playback/display_item_list.h" 10 #include "cc/playback/display_item_list.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 gfx::Rect PaintableRegion() override { return gfx::Rect(size_); } 110 gfx::Rect PaintableRegion() override { return gfx::Rect(size_); }
111 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( 111 scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
112 PaintingControlSetting painting_status) override { 112 PaintingControlSetting painting_status) override {
113 DisplayItemListSettings settings; 113 DisplayItemListSettings settings;
114 settings.use_cached_picture = false; 114 settings.use_cached_picture = false;
115 scoped_refptr<DisplayItemList> display_list = 115 scoped_refptr<DisplayItemList> display_list =
116 DisplayItemList::Create(PaintableRegion(), settings); 116 DisplayItemList::Create(PaintableRegion(), settings);
117 117
118 SkPictureRecorder recorder; 118 SkPictureRecorder recorder;
119 skia::RefPtr<SkCanvas> canvas = skia::SharePtr( 119 sk_sp<SkCanvas> canvas =
120 recorder.beginRecording(gfx::RectToSkRect(gfx::Rect(size_)))); 120 sk_ref_sp(recorder.beginRecording(gfx::RectToSkRect(gfx::Rect(size_))));
121 gfx::Rect top(0, 0, size_.width(), size_.height() / 2); 121 gfx::Rect top(0, 0, size_.width(), size_.height() / 2);
122 gfx::Rect bottom(0, size_.height() / 2, size_.width(), size_.height() / 2); 122 gfx::Rect bottom(0, size_.height() / 2, size_.width(), size_.height() / 2);
123 123
124 gfx::Rect blue_rect = blue_top_ ? top : bottom; 124 gfx::Rect blue_rect = blue_top_ ? top : bottom;
125 gfx::Rect yellow_rect = blue_top_ ? bottom : top; 125 gfx::Rect yellow_rect = blue_top_ ? bottom : top;
126 126
127 SkPaint paint; 127 SkPaint paint;
128 paint.setStyle(SkPaint::kFill_Style); 128 paint.setStyle(SkPaint::kFill_Style);
129 129
130 paint.setColor(SK_ColorBLUE); 130 paint.setColor(SK_ColorBLUE);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 FullRaster_SingleThread_GpuRaster) { 234 FullRaster_SingleThread_GpuRaster) {
235 RunRasterPixelTest( 235 RunRasterPixelTest(
236 false, FULL_GPU, picture_layer_, 236 false, FULL_GPU, picture_layer_,
237 base::FilePath(FILE_PATH_LITERAL("blue_yellow_flipped.png"))); 237 base::FilePath(FILE_PATH_LITERAL("blue_yellow_flipped.png")));
238 } 238 }
239 239
240 } // namespace 240 } // namespace
241 } // namespace cc 241 } // namespace cc
242 242
243 #endif // !defined(OS_ANDROID) 243 #endif // !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_masks.cc ('k') | chrome/browser/android/thumbnail/thumbnail.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698