Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1813553005/ )"

This reverts commit f28ad894272018fd2855e3f77ea1236ea0cce1c0.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813123003

TBR=

Review URL: https://codereview.chromium.org/1813123003
diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp
index c3cc2bb..38fd740 100644
--- a/samplecode/SampleSlides.cpp
+++ b/samplecode/SampleSlides.cpp
@@ -31,15 +31,14 @@
 
 static void compose_pe(SkPaint* paint) {
     SkPathEffect* pe = paint->getPathEffect();
-    SkPathEffect* corner = SkCornerPathEffect::Create(25);
-    SkPathEffect* compose;
+    sk_sp<SkPathEffect> corner = SkCornerPathEffect::Make(25);
+    sk_sp<SkPathEffect> compose;
     if (pe) {
-        compose = SkComposePathEffect::Create(pe, corner);
-        corner->unref();
+        compose = SkComposePathEffect::Make(sk_ref_sp(pe), corner);
     } else {
         compose = corner;
     }
-    paint->setPathEffect(compose)->unref();
+    paint->setPathEffect(compose);
 }
 
 static void hair_pe(SkPaint* paint) {
@@ -59,8 +58,7 @@
 static void dash_pe(SkPaint* paint) {
     SkScalar inter[] = { 20, 10, 10, 10 };
     paint->setStrokeWidth(12);
-    paint->setPathEffect(SkDashPathEffect::Create(inter, SK_ARRAY_COUNT(inter),
-                                                  0))->unref();
+    paint->setPathEffect(SkDashPathEffect::Make(inter, SK_ARRAY_COUNT(inter), 0));
     compose_pe(paint);
 }
 
@@ -83,8 +81,8 @@
     path.offset(SkIntToScalar(-6), 0);
     scale(&path, 1.5f);
 
-    paint->setPathEffect(SkPath1DPathEffect::Create(path, SkIntToScalar(21), 0,
-                                                    SkPath1DPathEffect::kRotate_Style))->unref();
+    paint->setPathEffect(SkPath1DPathEffect::Make(path, SkIntToScalar(21), 0,
+                                                  SkPath1DPathEffect::kRotate_Style));
     compose_pe(paint);
 }
 
@@ -97,21 +95,21 @@
 }
 
 static void discrete_pe(SkPaint* paint) {
-    paint->setPathEffect(SkDiscretePathEffect::Create(10, 4))->unref();
+    paint->setPathEffect(SkDiscretePathEffect::Make(10, 4));
 }
 
-static SkPathEffect* MakeTileEffect() {
+static sk_sp<SkPathEffect> MakeTileEffect() {
     SkMatrix m;
     m.setScale(SkIntToScalar(12), SkIntToScalar(12));
 
     SkPath path;
     path.addCircle(0, 0, SkIntToScalar(5));
 
-    return SkPath2DPathEffect::Create(m, path);
+    return SkPath2DPathEffect::Make(m, path);
 }
 
 static void tile_pe(SkPaint* paint) {
-    paint->setPathEffect(MakeTileEffect())->unref();
+    paint->setPathEffect(MakeTileEffect());
 }
 
 static const PE_Proc gPE2[] = { fill_pe, discrete_pe, tile_pe };
@@ -534,7 +532,7 @@
 {
     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);
 }
@@ -553,10 +551,10 @@
 
 #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)
@@ -564,7 +562,7 @@
     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);
 }
 
@@ -575,7 +573,7 @@
     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);
 
@@ -593,7 +591,7 @@
     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);