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

Unified Diff: gm/pictureimagegenerator.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 | « gm/pictureimagefilter.cpp ('k') | gm/pictureshader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/pictureimagegenerator.cpp
diff --git a/gm/pictureimagegenerator.cpp b/gm/pictureimagegenerator.cpp
index 2d50f3a6bedde651d0a90c2bcf9930314512cf19..60e979fc3c063ef2982d0c739d97c04a385e5420 100644
--- a/gm/pictureimagegenerator.cpp
+++ b/gm/pictureimagegenerator.cpp
@@ -108,7 +108,7 @@ protected:
SkPictureRecorder recorder;
SkCanvas* canvas = recorder.beginRecording(rect);
draw_vector_logo(canvas, rect);
- fPicture.reset(recorder.endRecording());
+ fPicture = recorder.finishRecordingAsPicture();
}
void onDraw(SkCanvas* canvas) override {
@@ -171,7 +171,7 @@ protected:
}
private:
- SkAutoTUnref<SkPicture> fPicture;
+ sk_sp<SkPicture> fPicture;
const SkScalar kPictureWidth = 200;
const SkScalar kPictureHeight = 100;
« no previous file with comments | « gm/pictureimagefilter.cpp ('k') | gm/pictureshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698