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

Unified Diff: tools/skiaserve/Request.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.h ('k') | tools/skpmaker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skiaserve/Request.cpp
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
index e0aad15aad705d80f311fe6cc99af080113af3aa..8627dd678e37610a4ab238ce2beabac2a893465d 100644
--- a/tools/skiaserve/Request.cpp
+++ b/tools/skiaserve/Request.cpp
@@ -131,7 +131,7 @@ SkData* Request::writeOutSkp() {
fDebugCanvas->draw(canvas);
- SkAutoTUnref<SkPicture> picture(recorder.endRecording());
+ sk_sp<SkPicture> picture(recorder.finishRecordingAsPicture());
SkDynamicMemoryWStream outStream;
@@ -215,8 +215,8 @@ bool Request::enableGPU(bool enable) {
bool Request::initPictureFromStream(SkStream* stream) {
// parse picture from stream
- fPicture.reset(SkPicture::CreateFromStream(stream));
- if (!fPicture.get()) {
+ fPicture = SkPicture::MakeFromStream(stream);
+ if (!fPicture) {
fprintf(stderr, "Could not create picture from stream.\n");
return false;
}
« no previous file with comments | « tools/skiaserve/Request.h ('k') | tools/skpmaker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698