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

Unified Diff: samplecode/ClockFaceView.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 | « include/effects/SkLayerDrawLooper.h ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/ClockFaceView.cpp
diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp
index a282c317c00d9a65cd70139488e523eeb09efd42..6e2b2b158519ef2acefcb126bc087c7c1d62d2f8 100644
--- a/samplecode/ClockFaceView.cpp
+++ b/samplecode/ClockFaceView.cpp
@@ -101,10 +101,10 @@ private:
typedef Sk2DPathEffect INHERITED;
};
-SkFlattenable* Dot2DPathEffect::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> Dot2DPathEffect::CreateProc(SkReadBuffer& buffer) {
SkMatrix matrix;
buffer.readMatrix(&matrix);
- return new Dot2DPathEffect(buffer.readScalar(), matrix, nullptr);
+ return sk_make_sp<Dot2DPathEffect>(buffer.readScalar(), matrix, nullptr);
}
class InverseFillPE : public SkPathEffect {
@@ -129,7 +129,9 @@ private:
typedef SkPathEffect INHERITED;
};
-SkFlattenable* InverseFillPE::CreateProc(SkReadBuffer& buffer) { return new InverseFillPE; }
+sk_sp<SkFlattenable> InverseFillPE::CreateProc(SkReadBuffer& buffer) {
+ return sk_make_sp<InverseFillPE>();
+}
static sk_sp<SkPathEffect> makepe(float interp, SkTDArray<SkPoint>* pts) {
SkMatrix lattice;
« no previous file with comments | « include/effects/SkLayerDrawLooper.h ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698