move all details for dashing into impl

Bug: skia:
Change-Id: I035603ad75158d9984cce7807bef6a668d9eb014
Reviewed-on: https://skia-review.googlesource.com/17793
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp
index b1029e1..04f9e9e 100644
--- a/src/effects/SkDashPathEffect.cpp
+++ b/src/effects/SkDashPathEffect.cpp
@@ -6,13 +6,13 @@
  */
 
 #include "SkDashPathEffect.h"
-
+#include "SkDashImpl.h"
 #include "SkDashPathPriv.h"
 #include "SkReadBuffer.h"
 #include "SkWriteBuffer.h"
 #include "SkStrokeRec.h"
 
-SkDashPathEffect::SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase)
+SkDashImpl::SkDashImpl(const SkScalar intervals[], int count, SkScalar phase)
         : fPhase(0)
         , fInitialDashLength(-1)
         , fInitialDashIndex(0)
@@ -31,12 +31,12 @@
             &fInitialDashLength, &fInitialDashIndex, &fIntervalLength, &fPhase);
 }
 
-SkDashPathEffect::~SkDashPathEffect() {
+SkDashImpl::~SkDashImpl() {
     sk_free(fIntervals);
 }
 
-bool SkDashPathEffect::filterPath(SkPath* dst, const SkPath& src,
-                              SkStrokeRec* rec, const SkRect* cullRect) const {
+bool SkDashImpl::filterPath(SkPath* dst, const SkPath& src, SkStrokeRec* rec,
+                            const SkRect* cullRect) const {
     return SkDashPath::InternalFilter(dst, src, rec, cullRect, fIntervals, fCount,
                                       fInitialDashLength, fInitialDashIndex, fIntervalLength);
 }
@@ -155,11 +155,8 @@
 // we need to:
 //      allow kRound_Cap capping (could allow rotations in the matrix with this)
 //      allow paths to be returned
-bool SkDashPathEffect::asPoints(PointData* results,
-                                const SkPath& src,
-                                const SkStrokeRec& rec,
-                                const SkMatrix& matrix,
-                                const SkRect* cullRect) const {
+bool SkDashImpl::asPoints(PointData* results, const SkPath& src, const SkStrokeRec& rec,
+                          const SkMatrix& matrix, const SkRect* cullRect) const {
     // width < 0 -> fill && width == 0 -> hairline so requiring width > 0 rules both out
     if (0 >= rec.getWidth()) {
         return false;
@@ -351,7 +348,7 @@
     return true;
 }
 
-SkPathEffect::DashType SkDashPathEffect::asADash(DashInfo* info) const {
+SkPathEffect::DashType SkDashImpl::asADash(DashInfo* info) const {
     if (info) {
         if (info->fCount >= fCount && info->fIntervals) {
             memcpy(info->fIntervals, fIntervals, fCount * sizeof(SkScalar));
@@ -362,23 +359,23 @@
     return kDash_DashType;
 }
 
-void SkDashPathEffect::flatten(SkWriteBuffer& buffer) const {
+void SkDashImpl::flatten(SkWriteBuffer& buffer) const {
     buffer.writeScalar(fPhase);
     buffer.writeScalarArray(fIntervals, fCount);
 }
 
-sk_sp<SkFlattenable> SkDashPathEffect::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkDashImpl::CreateProc(SkReadBuffer& buffer) {
     const SkScalar phase = buffer.readScalar();
     uint32_t count = buffer.getArrayCount();
     SkAutoSTArray<32, SkScalar> intervals(count);
     if (buffer.readScalarArray(intervals.get(), count)) {
-        return Make(intervals.get(), SkToInt(count), phase);
+        return SkDashPathEffect::Make(intervals.get(), SkToInt(count), phase);
     }
     return nullptr;
 }
 
 #ifndef SK_IGNORE_TO_STRING
-void SkDashPathEffect::toString(SkString* str) const {
+void SkDashImpl::toString(SkString* str) const {
     str->appendf("SkDashPathEffect: (");
     str->appendf("count: %d phase %.2f intervals: (", fCount, fPhase);
     for (int i = 0; i < fCount; ++i) {
@@ -397,5 +394,5 @@
     if (!SkDashPath::ValidDashPath(phase, intervals, count)) {
         return nullptr;
     }
-    return sk_sp<SkPathEffect>(new SkDashPathEffect(intervals, count, phase));
+    return sk_sp<SkPathEffect>(new SkDashImpl(intervals, count, phase));
 }