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

Unified Diff: src/effects/Sk1DPathEffect.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/core/SkReadBuffer.h ('k') | src/effects/Sk2DPathEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/Sk1DPathEffect.cpp
diff --git a/src/effects/Sk1DPathEffect.cpp b/src/effects/Sk1DPathEffect.cpp
index 4be6f975d3bfa792e7cec3fbe35a25c566699850..1d147bd78fb16ecdb3b75ddf4a830d5f5fb38947 100644
--- a/src/effects/Sk1DPathEffect.cpp
+++ b/src/effects/Sk1DPathEffect.cpp
@@ -153,7 +153,7 @@ SkFlattenable* SkPath1DPathEffect::CreateProc(SkReadBuffer& buffer) {
buffer.readPath(&path);
SkScalar phase = buffer.readScalar();
Style style = (Style)buffer.readUInt();
- return SkPath1DPathEffect::Create(path, advance, phase, style);
+ return SkPath1DPathEffect::Make(path, advance, phase, style).release();
}
return nullptr;
}
@@ -204,10 +204,10 @@ void SkPath1DPathEffect::toString(SkString* str) const {
///////////////////////////////////////////////////////////////////////////////////////////////////
-SkPathEffect* SkPath1DPathEffect::Create(const SkPath& path, SkScalar advance, SkScalar phase,
- Style style) {
+sk_sp<SkPathEffect> SkPath1DPathEffect::Make(const SkPath& path, SkScalar advance, SkScalar phase,
+ Style style) {
if (advance <= 0 || path.isEmpty()) {
return nullptr;
}
- return new SkPath1DPathEffect(path, advance, phase, style);
+ return sk_sp<SkPathEffect>(new SkPath1DPathEffect(path, advance, phase, style));
}
« no previous file with comments | « src/core/SkReadBuffer.h ('k') | src/effects/Sk2DPathEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698