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

Unified Diff: tools/skpmaker.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/skiaserve/Request.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpmaker.cpp
diff --git a/tools/skpmaker.cpp b/tools/skpmaker.cpp
index 8fa969a6f072f2a87dc55ca0088ae5d719d58774..99e6adf997166e1e055851148489a9ef8fcb4a24 100644
--- a/tools/skpmaker.cpp
+++ b/tools/skpmaker.cpp
@@ -41,9 +41,8 @@ static void make_skp(SkScalar width, SkScalar height, SkScalar border, SkColor c
paint.setColor(color);
r.inset(border, border);
canvas->drawRect(r, paint);
- SkAutoTUnref<SkPicture> pict(recorder.endRecording());
SkFILEWStream stream(writePath);
- pict->serialize(&stream);
+ recorder.finishRecordingAsPicture()->serialize(&stream);
}
int tool_main(int argc, char** argv);
« no previous file with comments | « tools/skiaserve/Request.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698