Index: gm/texteffects.cpp |
diff --git a/gm/texteffects.cpp b/gm/texteffects.cpp |
index 6ad3d23bf20db2b598e5a2391bfa026675909770..aa3d3758abb0f26ae4c75ab2e07db71ce5644769 100644 |
--- a/gm/texteffects.cpp |
+++ b/gm/texteffects.cpp |
@@ -77,7 +77,7 @@ static void r4(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) { |
static void r5(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) { |
rastBuilder->addLayer(p); |
- p.setPathEffect(SkDiscretePathEffect::Create(SK_Scalar1*4, SK_Scalar1*3))->unref(); |
+ p.setPathEffect(SkDiscretePathEffect::Make(SK_Scalar1*4, SK_Scalar1*3)); |
p.setXfermodeMode(SkXfermode::kSrcOut_Mode); |
rastBuilder->addLayer(p); |
} |
@@ -95,17 +95,17 @@ static void r6(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) { |
#include "Sk2DPathEffect.h" |
-static SkPathEffect* MakeDotEffect(SkScalar radius, const SkMatrix& matrix) { |
+static sk_sp<SkPathEffect> MakeDotEffect(SkScalar radius, const SkMatrix& matrix) { |
SkPath path; |
path.addCircle(0, 0, radius); |
- return SkPath2DPathEffect::Create(matrix, path); |
+ return SkPath2DPathEffect::Make(matrix, path); |
} |
static void r7(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) { |
SkMatrix lattice; |
lattice.setScale(SK_Scalar1*6, SK_Scalar1*6, 0, 0); |
lattice.postSkew(SK_Scalar1/3, 0, 0, 0); |
- p.setPathEffect(MakeDotEffect(SK_Scalar1*4, lattice))->unref(); |
+ p.setPathEffect(MakeDotEffect(SK_Scalar1*4, lattice)); |
rastBuilder->addLayer(p); |
} |
@@ -115,7 +115,7 @@ static void r8(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) { |
SkMatrix lattice; |
lattice.setScale(SK_Scalar1*6, SK_Scalar1*6, 0, 0); |
lattice.postSkew(SK_Scalar1/3, 0, 0, 0); |
- p.setPathEffect(MakeDotEffect(SK_Scalar1*2, lattice))->unref(); |
+ p.setPathEffect(MakeDotEffect(SK_Scalar1*2, lattice)); |
p.setXfermodeMode(SkXfermode::kClear_Mode); |
rastBuilder->addLayer(p); |
@@ -132,7 +132,7 @@ static void r9(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) { |
SkMatrix lattice; |
lattice.setScale(SK_Scalar1, SK_Scalar1*6, 0, 0); |
lattice.postRotate(SkIntToScalar(30), 0, 0); |
- p.setPathEffect(SkLine2DPathEffect::Create(SK_Scalar1*2, lattice))->unref(); |
+ p.setPathEffect(SkLine2DPathEffect::Make(SK_Scalar1*2, lattice)); |
p.setXfermodeMode(SkXfermode::kClear_Mode); |
rastBuilder->addLayer(p); |