| Index: samplecode/ClockFaceView.cpp
|
| diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp
|
| index f5b43fb82f72864cd37bc27320860d999c7d9c7c..11684e11ada34150d462a6e744c7b333512fba64 100644
|
| --- a/samplecode/ClockFaceView.cpp
|
| +++ b/samplecode/ClockFaceView.cpp
|
| @@ -132,16 +132,16 @@
|
|
|
| SkFlattenable* InverseFillPE::CreateProc(SkReadBuffer& buffer) { return new InverseFillPE; }
|
|
|
| -static sk_sp<SkPathEffect> makepe(float interp, SkTDArray<SkPoint>* pts) {
|
| +static SkPathEffect* makepe(float interp, SkTDArray<SkPoint>* pts) {
|
| SkMatrix lattice;
|
| SkScalar rad = 3 + SkIntToScalar(4) * (1 - interp);
|
| lattice.setScale(rad*2, rad*2, 0, 0);
|
| lattice.postSkew(SK_Scalar1/3, 0, 0, 0);
|
| - return sk_make_sp<Dot2DPathEffect>(rad, lattice, pts);
|
| + return new Dot2DPathEffect(rad, lattice, pts);
|
| }
|
|
|
| static void r7(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p, SkScalar interp) {
|
| - p.setPathEffect(makepe(SkScalarToFloat(interp), nullptr));
|
| + p.setPathEffect(makepe(SkScalarToFloat(interp), nullptr))->unref();
|
| rastBuilder->addLayer(p);
|
| #if 0
|
| p.setPathEffect(new InverseFillPE())->unref();
|
| @@ -201,7 +201,7 @@
|
|
|
| static void drawdots(SkCanvas* canvas, const SkPaint& orig) {
|
| SkTDArray<SkPoint> pts;
|
| - auto pe = makepe(0, &pts);
|
| + SkPathEffect* pe = makepe(0, &pts);
|
|
|
| SkStrokeRec rec(SkStrokeRec::kFill_InitStyle);
|
| SkPath path, dstPath;
|
| @@ -212,7 +212,8 @@
|
| p.setAntiAlias(true);
|
| p.setStrokeWidth(10);
|
| p.setColor(SK_ColorRED);
|
| - canvas->drawPoints(SkCanvas::kPoints_PointMode, pts.count(), pts.begin(), p);
|
| + canvas->drawPoints(SkCanvas::kPoints_PointMode, pts.count(), pts.begin(),
|
| + p);
|
| }
|
|
|
| virtual void onDraw(SkCanvas* canvas) {
|
|
|