aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-04-03 09:11:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-03 09:11:13 -0700
commit60c9b58b3214b0154c931656e91e39b230e987d8 (patch)
tree6dd59cf90dd96a443a50ae4b6fa14be6f778c823 /samplecode
parentcf9bafceafaf6c0bf8b0eac8de509aa1d8407fca (diff)
change flattenable factory to return sk_sp
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/ClockFaceView.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp
index a282c317c0..6e2b2b1585 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;