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

Unified Diff: src/effects/Sk2DPathEffect.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/Sk1DPathEffect.cpp ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/Sk2DPathEffect.cpp
diff --git a/src/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp
index da43d22487185854d1eedd54ba2f7dbc5e902770..52e3fa5e1c88b63d3f7c797a5ab736a7e8feb81f 100644
--- a/src/effects/Sk2DPathEffect.cpp
+++ b/src/effects/Sk2DPathEffect.cpp
@@ -106,11 +106,11 @@ void SkLine2DPathEffect::nextSpan(int u, int v, int ucount, SkPath* dst) const {
}
}
-SkFlattenable* SkLine2DPathEffect::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkLine2DPathEffect::CreateProc(SkReadBuffer& buffer) {
SkMatrix matrix;
buffer.readMatrix(&matrix);
SkScalar width = buffer.readScalar();
- return SkLine2DPathEffect::Make(width, matrix).release();
+ return SkLine2DPathEffect::Make(width, matrix);
}
void SkLine2DPathEffect::flatten(SkWriteBuffer &buffer) const {
@@ -134,12 +134,12 @@ SkPath2DPathEffect::SkPath2DPathEffect(const SkMatrix& m, const SkPath& p)
: INHERITED(m), fPath(p) {
}
-SkFlattenable* SkPath2DPathEffect::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkPath2DPathEffect::CreateProc(SkReadBuffer& buffer) {
SkMatrix matrix;
buffer.readMatrix(&matrix);
SkPath path;
buffer.readPath(&path);
- return SkPath2DPathEffect::Make(matrix, path).release();
+ return SkPath2DPathEffect::Make(matrix, path);
}
void SkPath2DPathEffect::flatten(SkWriteBuffer& buffer) const {
« no previous file with comments | « src/effects/Sk1DPathEffect.cpp ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698