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

Unified Diff: src/effects/SkDashPathEffect.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/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 51bf54839c166caec5d1729ed32c7ab907e91d6a..90af32ec5b0fb6686699271f2c888704207a65d4 100644
--- a/src/effects/SkDashPathEffect.cpp
+++ b/src/effects/SkDashPathEffect.cpp
@@ -360,12 +360,12 @@ void SkDashPathEffect::flatten(SkWriteBuffer& buffer) const {
buffer.writeScalarArray(fIntervals, fCount);
}
-SkFlattenable* SkDashPathEffect::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkDashPathEffect::CreateProc(SkReadBuffer& buffer) {
const SkScalar phase = buffer.readScalar();
uint32_t count = buffer.getArrayCount();
SkAutoSTArray<32, SkScalar> intervals(count);
if (buffer.readScalarArray(intervals.get(), count)) {
- return Make(intervals.get(), SkToInt(count), phase).release();
+ return Make(intervals.get(), SkToInt(count), phase);
}
return nullptr;
}
« 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