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

Unified Diff: tools/gpuveto.cpp

Issue 1811703002: return pictures as sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rely on RVO in picturerecorder Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/get_images_from_skps.cpp ('k') | tools/kilobench/kilobench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpuveto.cpp
diff --git a/tools/gpuveto.cpp b/tools/gpuveto.cpp
index f2e103e1e38d4c4a99c27a55e30015fdfb6645d4..41ca0c8dd358e7f8a392fdee1de545b323297e56 100644
--- a/tools/gpuveto.cpp
+++ b/tools/gpuveto.cpp
@@ -41,8 +41,8 @@ int tool_main(int argc, char** argv) {
return kError;
}
- SkAutoTUnref<SkPicture> picture(SkPicture::CreateFromStream(&inputStream));
- if (nullptr == picture.get()) {
+ sk_sp<SkPicture> picture(SkPicture::MakeFromStream(&inputStream));
+ if (nullptr == picture) {
if (!FLAGS_quiet) {
SkDebugf("Could not read the SkPicture\n");
}
@@ -55,7 +55,7 @@ int tool_main(int argc, char** argv) {
picture->playback(recorder.beginRecording(picture->cullRect().width(),
picture->cullRect().height(),
nullptr, 0));
- SkAutoTUnref<SkPicture> recorded(recorder.endRecording());
+ sk_sp<SkPicture> recorded(recorder.finishRecordingAsPicture());
if (recorded->suitableForGpuRasterization(nullptr)) {
SkDebugf("suitable\n");
« no previous file with comments | « tools/get_images_from_skps.cpp ('k') | tools/kilobench/kilobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698