Index: src/effects/SkDashPathEffect.cpp |
diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp |
index 38164999159176a59bc49baf7930179b02309fd9..51bf54839c166caec5d1729ed32c7ab907e91d6a 100644 |
--- a/src/effects/SkDashPathEffect.cpp |
+++ b/src/effects/SkDashPathEffect.cpp |
@@ -365,7 +365,7 @@ SkFlattenable* SkDashPathEffect::CreateProc(SkReadBuffer& buffer) { |
uint32_t count = buffer.getArrayCount(); |
SkAutoSTArray<32, SkScalar> intervals(count); |
if (buffer.readScalarArray(intervals.get(), count)) { |
- return Create(intervals.get(), SkToInt(count), phase); |
+ return Make(intervals.get(), SkToInt(count), phase).release(); |
} |
return nullptr; |
} |
@@ -386,9 +386,9 @@ void SkDashPathEffect::toString(SkString* str) const { |
////////////////////////////////////////////////////////////////////////////////////////////////// |
-SkPathEffect* SkDashPathEffect::Create(const SkScalar intervals[], int count, SkScalar phase) { |
+sk_sp<SkPathEffect> SkDashPathEffect::Make(const SkScalar intervals[], int count, SkScalar phase) { |
if (!SkDashPath::ValidDashPath(phase, intervals, count)) { |
return nullptr; |
} |
- return new SkDashPathEffect(intervals, count, phase); |
+ return sk_sp<SkPathEffect>(new SkDashPathEffect(intervals, count, phase)); |
} |