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

Unified Diff: src/effects/SkImageSource.cpp

Issue 1855733002: change flattenable factory to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/effects/SkEmbossMaskFilter.cpp ('k') | src/effects/SkLayerDrawLooper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkImageSource.cpp
diff --git a/src/effects/SkImageSource.cpp b/src/effects/SkImageSource.cpp
index f16e5a140fcdcae62d45d593c79e3ae96681bb4e..cf8cae2c3919da8634e3b40ac8b5cbd786ebdf80 100644
--- a/src/effects/SkImageSource.cpp
+++ b/src/effects/SkImageSource.cpp
@@ -35,7 +35,7 @@ SkImageSource::SkImageSource(sk_sp<SkImage> image,
, fFilterQuality(filterQuality) {
}
-SkFlattenable* SkImageSource::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkImageSource::CreateProc(SkReadBuffer& buffer) {
SkFilterQuality filterQuality = (SkFilterQuality)buffer.readInt();
SkRect src, dst;
@@ -47,7 +47,7 @@ SkFlattenable* SkImageSource::CreateProc(SkReadBuffer& buffer) {
return nullptr;
}
- return SkImageSource::Make(std::move(image), src, dst, filterQuality).release();
+ return SkImageSource::Make(std::move(image), src, dst, filterQuality);
}
void SkImageSource::flatten(SkWriteBuffer& buffer) const {
« no previous file with comments | « src/effects/SkEmbossMaskFilter.cpp ('k') | src/effects/SkLayerDrawLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698