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

Unified Diff: gm/distantclip.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 | « fuzz/fuzz.cpp ('k') | gm/filterfastbounds.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/distantclip.cpp
diff --git a/gm/distantclip.cpp b/gm/distantclip.cpp
index dbfe9160a83005bff3386a6e66ffd17f7e008563..fd96564057c8d444228cbc6d8ec8446377c619d7 100644
--- a/gm/distantclip.cpp
+++ b/gm/distantclip.cpp
@@ -43,13 +43,13 @@ protected:
rec->clipPath(p, SkRegion::kIntersect_Op, true);
rec->drawColor(SK_ColorGREEN);
rec->restore();
- SkAutoTUnref<SkPicture> pict(recorder.endRecording());
+ sk_sp<SkPicture> pict(recorder.finishRecordingAsPicture());
// Next we play that picture into another picture of the same size.
pict->playback(recorder.beginRecording(pict->cullRect().width(),
pict->cullRect().height(),
nullptr, 0));
- SkAutoTUnref<SkPicture> pict2(recorder.endRecording());
+ sk_sp<SkPicture> pict2(recorder.finishRecordingAsPicture());
// Finally we play the part of that second picture that should be green into the canvas.
canvas->save();
« no previous file with comments | « fuzz/fuzz.cpp ('k') | gm/filterfastbounds.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698