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

Unified Diff: src/effects/SkDashPathEffect.cpp

Issue 1813123003: Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.or… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move flag into sktypes, so it is visible to both paint and other patheffect clients 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/SkCornerPathEffect.cpp ('k') | src/effects/SkDiscretePathEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « src/effects/SkCornerPathEffect.cpp ('k') | src/effects/SkDiscretePathEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698