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

Unified Diff: src/core/SkPathEffect.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/core/SkPaint.cpp ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPathEffect.cpp
diff --git a/src/core/SkPathEffect.cpp b/src/core/SkPathEffect.cpp
index b2e29bc09d9d30cd0ab2858a62b12fe6039c3055..1178348af530a8972ff4f7d0f61d09dc6df608bf 100644
--- a/src/core/SkPathEffect.cpp
+++ b/src/core/SkPathEffect.cpp
@@ -57,10 +57,10 @@ void SkPairPathEffect::toString(SkString* str) const {
///////////////////////////////////////////////////////////////////////////////
-SkFlattenable* SkComposePathEffect::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkComposePathEffect::CreateProc(SkReadBuffer& buffer) {
sk_sp<SkPathEffect> pe0(buffer.readPathEffect());
sk_sp<SkPathEffect> pe1(buffer.readPathEffect());
- return SkComposePathEffect::Make(std::move(pe0), std::move(pe1)).release();
+ return SkComposePathEffect::Make(std::move(pe0), std::move(pe1));
}
bool SkComposePathEffect::filterPath(SkPath* dst, const SkPath& src,
@@ -85,10 +85,10 @@ void SkComposePathEffect::toString(SkString* str) const {
///////////////////////////////////////////////////////////////////////////////
-SkFlattenable* SkSumPathEffect::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkSumPathEffect::CreateProc(SkReadBuffer& buffer) {
sk_sp<SkPathEffect> pe0(buffer.readPathEffect());
sk_sp<SkPathEffect> pe1(buffer.readPathEffect());
- return SkSumPathEffect::Make(pe0, pe1).release();
+ return SkSumPathEffect::Make(pe0, pe1);
}
bool SkSumPathEffect::filterPath(SkPath* dst, const SkPath& src,
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698