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

Unified Diff: src/effects/SkPictureImageFilter.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 | « src/core/SkPictureShader.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkPictureImageFilter.cpp
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp
index d1a7fc59cf6cc9bfb697e355a9ebb074bb3ea00c..14c14bb1762f4785e04819d91a10ca1053dd2c0a 100644
--- a/src/effects/SkPictureImageFilter.cpp
+++ b/src/effects/SkPictureImageFilter.cpp
@@ -36,14 +36,14 @@ SkPictureImageFilter::~SkPictureImageFilter() {
}
SkFlattenable* SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) {
- SkAutoTUnref<SkPicture> picture;
+ sk_sp<SkPicture> picture;
SkRect cropRect;
if (buffer.isCrossProcess() && SkPicture::PictureIOSecurityPrecautionsEnabled()) {
buffer.validate(!buffer.readBool());
} else {
if (buffer.readBool()) {
- picture.reset(SkPicture::CreateFromBuffer(buffer));
+ picture = SkPicture::MakeFromBuffer(buffer);
}
}
buffer.readRect(&cropRect);
@@ -62,9 +62,9 @@ SkFlattenable* SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) {
} else {
filterQuality = (SkFilterQuality)buffer.readInt();
}
- return CreateForLocalSpace(picture, cropRect, filterQuality);
+ return CreateForLocalSpace(picture.get(), cropRect, filterQuality);
}
- return Create(picture, cropRect);
+ return Create(picture.get(), cropRect);
}
void SkPictureImageFilter::flatten(SkWriteBuffer& buffer) const {
« no previous file with comments | « src/core/SkPictureShader.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698