remove (unused?) arcto patheffect

Bug: skia:
Change-Id: I80943cc495eb1edce839387f4b9512a66a4e5c11
Reviewed-on: https://skia-review.googlesource.com/25981
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/fuzz/FilterFuzz.cpp b/fuzz/FilterFuzz.cpp
index d153707..015a0a0 100644
--- a/fuzz/FilterFuzz.cpp
+++ b/fuzz/FilterFuzz.cpp
@@ -8,7 +8,6 @@
 #include "Sk1DPathEffect.h"
 #include "Sk2DPathEffect.h"
 #include "SkAlphaThresholdFilter.h"
-#include "SkArcToPathEffect.h"
 #include "SkBlurImageFilter.h"
 #include "SkBlurMaskFilter.h"
 #include "SkCanvas.h"
@@ -414,12 +413,14 @@
     fuzz->nextRange(&s, 0, 2);
     if (canBeNull && s == 0) { return pathEffect; }
 
-    fuzz->nextRange(&s, 0, 8);
+    fuzz->nextRange(&s, 0, 7);
 
     switch (s) {
         case 0: {
-            SkScalar a = make_number(true);
-            pathEffect = SkArcToPathEffect::Make(a);
+            SkPath path = make_path();
+            SkMatrix m;
+            init_matrix(&m);
+            pathEffect = SkPath2DPathEffect::Make(m, path);
             break;
         }
         case 1: {
@@ -463,14 +464,7 @@
             pathEffect = SkLine2DPathEffect::Make(a, m);
             break;
         }
-        case 7: {
-            SkPath path = make_path();
-            SkMatrix m;
-            init_matrix(&m);
-            pathEffect = SkPath2DPathEffect::Make(m, path);
-            break;
-        }
-        case 8:
+        case 7:
         default: {
             sk_sp<SkPathEffect> a = make_path_effect(false);
             sk_sp<SkPathEffect> b = make_path_effect(false);
diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp
index 317578c..bcd4619 100644
--- a/fuzz/FuzzCanvas.cpp
+++ b/fuzz/FuzzCanvas.cpp
@@ -28,7 +28,6 @@
 #include "Sk1DPathEffect.h"
 #include "Sk2DPathEffect.h"
 #include "SkAlphaThresholdFilter.h"
-#include "SkArcToPathEffect.h"
 #include "SkArithmeticImageFilter.h"
 #include "SkBlurImageFilter.h"
 #include "SkBlurMaskFilter.h"
@@ -496,7 +495,7 @@
         return nullptr;
     }
     uint8_t pathEffectType;
-    fuzz->nextRange(&pathEffectType, 0, 9);
+    fuzz->nextRange(&pathEffectType, 0, 8);
     switch (pathEffectType) {
         case 0: {
             return nullptr;
@@ -536,14 +535,9 @@
         case 6: {
             SkScalar radius;
             fuzz->next(&radius);
-            return SkArcToPathEffect::Make(radius);
-        }
-        case 7: {
-            SkScalar radius;
-            fuzz->next(&radius);
             return SkCornerPathEffect::Make(radius);
         }
-        case 8: {
+        case 7: {
             SkScalar phase;
             fuzz->next(&phase);
             SkScalar intervals[20];
@@ -552,7 +546,7 @@
             fuzz->nextN(intervals, count);
             return SkDashPathEffect::Make(intervals, count, phase);
         }
-        case 9: {
+        case 8: {
             SkScalar segLength, dev;
             uint32_t seed;
             fuzz->next(&segLength, &dev, &seed);
diff --git a/gn/effects.gni b/gn/effects.gni
index 9418e12..1e86d2f 100644
--- a/gn/effects.gni
+++ b/gn/effects.gni
@@ -18,7 +18,6 @@
   "$_src/effects/Sk1DPathEffect.cpp",
   "$_src/effects/Sk2DPathEffect.cpp",
   "$_src/effects/SkAlphaThresholdFilter.cpp",
-  "$_src/effects/SkArcToPathEffect.cpp",
   "$_src/effects/SkArithmeticImageFilter.cpp",
   "$_src/effects/SkBlurMask.cpp",
   "$_src/effects/SkBlurMask.h",
diff --git a/include/effects/SkArcToPathEffect.h b/include/effects/SkArcToPathEffect.h
deleted file mode 100644
index fcf4a3a..0000000
--- a/include/effects/SkArcToPathEffect.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkArcToPathEffect_DEFINED
-#define SkArcToPathEffect_DEFINED
-
-#include "SkPathEffect.h"
-
-class SK_API SkArcToPathEffect : public SkPathEffect {
-public:
-    /** radius must be > 0 to have an effect. It specifies the distance from each corner
-        that should be "rounded".
-    */
-    static sk_sp<SkPathEffect> Make(SkScalar radius) {
-        if (radius <= 0) {
-            return NULL;
-        }
-        return sk_sp<SkPathEffect>(new SkArcToPathEffect(radius));
-    }
-
-    bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const override;
-
-    SK_TO_STRING_OVERRIDE()
-    SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArcToPathEffect)
-
-protected:
-    explicit SkArcToPathEffect(SkScalar radius);
-    void flatten(SkWriteBuffer&) const override;
-
-private:
-    SkScalar fRadius;
-
-    typedef SkPathEffect INHERITED;
-};
-
-#endif
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index dcb740d..ec9476f 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -8,7 +8,6 @@
 #include "Sk1DPathEffect.h"
 #include "Sk2DPathEffect.h"
 #include "SkAlphaThresholdFilter.h"
-#include "SkArcToPathEffect.h"
 #include "SkBlurImageFilter.h"
 #include "SkBlurMaskFilter.h"
 #include "SkCanvas.h"
@@ -418,9 +417,9 @@
     sk_sp<SkPathEffect> pathEffect;
     if (canBeNull && (R(3) == 1)) { return pathEffect; }
 
-    switch (R(9)) {
+    switch (R(8)) {
         case 0:
-            pathEffect = SkArcToPathEffect::Make(make_scalar(true));
+            pathEffect = SkPath2DPathEffect::Make(make_matrix(), make_path());
             break;
         case 1:
             pathEffect = SkPathEffect::MakeCompose(make_path_effect(false),
@@ -449,9 +448,6 @@
             pathEffect = SkLine2DPathEffect::Make(make_scalar(), make_matrix());
             break;
         case 7:
-            pathEffect = SkPath2DPathEffect::Make(make_matrix(), make_path());
-            break;
-        case 8:
         default:
             pathEffect = SkPathEffect::MakeSum(make_path_effect(false),
                                                make_path_effect(false));
diff --git a/samplecode/SamplePath.cpp b/samplecode/SamplePath.cpp
index 6438dcf..0fb5287 100644
--- a/samplecode/SamplePath.cpp
+++ b/samplecode/SamplePath.cpp
@@ -208,13 +208,12 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-#include "SkArcToPathEffect.h"
 #include "SkCornerPathEffect.h"
 #include "SkRandom.h"
 
 class ArcToView : public SampleView {
-    bool fDoFrame, fDoArcTo, fDoCorner, fDoConic;
-    SkPaint fPtsPaint, fArcToPaint, fSkeletonPaint, fCornerPaint;
+    bool fDoFrame, fDoCorner, fDoConic;
+    SkPaint fPtsPaint, fSkeletonPaint, fCornerPaint;
 public:
     enum {
         N = 4
@@ -222,7 +221,7 @@
     SkPoint fPts[N];
 
     ArcToView()
-        : fDoFrame(false), fDoArcTo(false), fDoCorner(false), fDoConic(false)
+        : fDoFrame(false), fDoCorner(false), fDoConic(false)
     {
         SkRandom rand;
         for (int i = 0; i < N; ++i) {
@@ -236,12 +235,6 @@
         fPtsPaint.setStrokeWidth(15);
         fPtsPaint.setStrokeCap(SkPaint::kRound_Cap);
 
-        fArcToPaint.setAntiAlias(true);
-        fArcToPaint.setStyle(SkPaint::kStroke_Style);
-        fArcToPaint.setStrokeWidth(9);
-        fArcToPaint.setColor(0x800000FF);
-        fArcToPaint.setPathEffect(SkArcToPathEffect::Make(rad));
-
         fCornerPaint.setAntiAlias(true);
         fCornerPaint.setStyle(SkPaint::kStroke_Style);
         fCornerPaint.setStrokeWidth(13);
@@ -269,9 +262,8 @@
         if (SampleCode::CharQ(*evt, &uni)) {
             switch (uni) {
                 case '1': this->toggle(fDoFrame); return true;
-                case '2': this->toggle(fDoArcTo); return true;
-                case '3': this->toggle(fDoCorner); return true;
-                case '4': this->toggle(fDoConic); return true;
+                case '2': this->toggle(fDoCorner); return true;
+                case '3': this->toggle(fDoConic); return true;
                 default: break;
             }
         }
@@ -297,9 +289,6 @@
         if (fDoCorner) {
             canvas->drawPath(path, fCornerPaint);
         }
-        if (fDoArcTo) {
-            canvas->drawPath(path, fArcToPaint);
-        }
 
         canvas->drawPath(path, fSkeletonPaint);
     }
diff --git a/src/effects/SkArcToPathEffect.cpp b/src/effects/SkArcToPathEffect.cpp
deleted file mode 100644
index a6273db..0000000
--- a/src/effects/SkArcToPathEffect.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkArcToPathEffect.h"
-#include "SkPath.h"
-#include "SkPoint.h"
-#include "SkReadBuffer.h"
-#include "SkWriteBuffer.h"
-
-SkArcToPathEffect::SkArcToPathEffect(SkScalar radius) : fRadius(radius) {}
-
-bool SkArcToPathEffect::filterPath(SkPath* dst, const SkPath& src,
-                                   SkStrokeRec*, const SkRect*) const {
-    SkPath::Iter    iter(src, false);
-    SkPath::Verb    verb;
-    SkPoint         pts[4];
-
-    SkPoint         lastCorner = { 0, 0 }; // avoid warning
-    SkPath::Verb    prevVerb = SkPath::kMove_Verb;
-
-    for (;;) {
-        switch (verb = iter.next(pts, false)) {
-            case SkPath::kMove_Verb:
-                if (SkPath::kLine_Verb == prevVerb) {
-                    dst->lineTo(lastCorner);
-                }
-                dst->moveTo(pts[0]);
-                break;
-            case SkPath::kLine_Verb:
-                if (prevVerb == SkPath::kLine_Verb) {
-                    dst->arcTo(pts[0], pts[1], fRadius);
-                }
-                lastCorner = pts[1];
-                break;
-            case SkPath::kQuad_Verb:
-                dst->quadTo(pts[1], pts[2]);
-                lastCorner = pts[2];
-                break;
-            case SkPath::kConic_Verb:
-                dst->conicTo(pts[1], pts[2], iter.conicWeight());
-                lastCorner = pts[2];
-                break;
-            case SkPath::kCubic_Verb:
-                dst->cubicTo(pts[1], pts[2], pts[3]);
-                lastCorner = pts[3];
-                break;
-            case SkPath::kClose_Verb:
-                dst->lineTo(lastCorner);
-                break;
-            case SkPath::kDone_Verb:
-                dst->lineTo(lastCorner);
-                goto DONE;
-        }
-        prevVerb = verb;
-    }
-DONE:
-    return true;
-}
-
-sk_sp<SkFlattenable> SkArcToPathEffect::CreateProc(SkReadBuffer& buffer) {
-    return SkArcToPathEffect::Make(buffer.readScalar());
-}
-
-void SkArcToPathEffect::flatten(SkWriteBuffer& buffer) const {
-    buffer.writeScalar(fRadius);
-}
-
-#ifndef SK_IGNORE_TO_STRING
-void SkArcToPathEffect::toString(SkString* str) const {
-    str->appendf("SkArcToPathEffect: (");
-    str->appendf("radius: %f", fRadius);
-    str->appendf(")");
-}
-#endif
diff --git a/src/ports/SkGlobalInitialization_default.cpp b/src/ports/SkGlobalInitialization_default.cpp
index fd13e2c..678e38a 100644
--- a/src/ports/SkGlobalInitialization_default.cpp
+++ b/src/ports/SkGlobalInitialization_default.cpp
@@ -8,7 +8,6 @@
 #include "Sk1DPathEffect.h"
 #include "Sk2DPathEffect.h"
 #include "SkAlphaThresholdFilter.h"
-#include "SkArcToPathEffect.h"
 #include "SkBitmapSourceDeserializer.h"
 #include "SkBlurImageFilter.h"
 #include "SkBlurMaskFilter.h"
@@ -91,7 +90,6 @@
     SkNormalSource::InitializeFlattenables();
 
     // PathEffect
-    SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArcToPathEffect)
     SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkCornerPathEffect)
     SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDashImpl)
     SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiscretePathEffect)