Remove drawPosText_asPath - more dead code

Change-Id: I4a0a1eb093767962fb0cd631ad41561962a233ea
Reviewed-on: https://skia-review.googlesource.com/150540
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
diff --git a/gn/core.gni b/gn/core.gni
index 254ca94..5355a7c 100644
--- a/gn/core.gni
+++ b/gn/core.gni
@@ -313,7 +313,6 @@
   "$_src/core/SkTDynamicHash.h",
   "$_src/core/SkTextBlob.cpp",
   "$_src/core/SkTextFormatParams.h",
-  "$_src/core/SkTextMapStateProc.h",
   "$_src/core/SkTextToPathIter.h",
   "$_src/core/SkTime.cpp",
 
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 37a1662..ae97d05 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -34,7 +34,6 @@
 #include "SkStrokeRec.h"
 #include "SkTLazy.h"
 #include "SkTemplates.h"
-#include "SkTextMapStateProc.h"
 #include "SkTo.h"
 #include "SkUtils.h"
 
@@ -1484,49 +1483,6 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-void SkDraw::drawPosText_asPaths(const char text[], size_t byteLength, const SkScalar pos[],
-                                 int scalarsPerPosition, const SkPoint& offset,
-                                 const SkPaint& origPaint, const SkSurfaceProps* props) const {
-    // setup our std paint, in hopes of getting hits in the cache
-    SkPaint paint(origPaint);
-    SkScalar matrixScale = paint.setupForAsPaths();
-
-    SkMatrix matrix;
-    matrix.setScale(matrixScale, matrixScale);
-
-    // Temporarily jam in kFill, so we only ever ask for the raw outline from the cache.
-    paint.setStyle(SkPaint::kFill_Style);
-    paint.setPathEffect(nullptr);
-
-    SkPaint::GlyphCacheProc glyphCacheProc = SkPaint::GetGlyphCacheProc(paint.getTextEncoding(),
-                                                                        true);
-    auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(
-            paint, props, this->scalerContextFlags(), nullptr);
-
-    const char*        stop = text + byteLength;
-    SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition);
-
-    // Now restore the original settings, so we "draw" with whatever style/stroking.
-    paint.setStyle(origPaint.getStyle());
-    paint.setPathEffect(origPaint.refPathEffect());
-
-    while (text < stop) {
-        const SkGlyph& glyph = glyphCacheProc(cache.get(), &text, stop);
-        if (glyph.fWidth) {
-            const SkPath* path = cache->findPath(glyph);
-            if (path) {
-                SkPoint loc;
-                tmsProc(pos, &loc);
-
-                matrix[SkMatrix::kMTransX] = loc.fX;
-                matrix[SkMatrix::kMTransY] = loc.fY;
-                this->drawPath(*path, paint, &matrix, false);
-            }
-        }
-        pos += scalarsPerPosition;
-    }
-}
-
 void SkDraw::blitARGB32Mask(const SkMask& mask, const SkPaint& paint) const {
     SkASSERT(SkMask::kARGB32_Format == mask.fFormat);
     SkBitmap bm;
diff --git a/src/core/SkTextMapStateProc.h b/src/core/SkTextMapStateProc.h
deleted file mode 100644
index 3989706..0000000
--- a/src/core/SkTextMapStateProc.h
+++ /dev/null
@@ -1,77 +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 SkTextMapStateProc_DEFINED
-#define SkTextMapStateProc_DEFINED
-
-#include "SkPoint.h"
-#include "SkMatrixPriv.h"
-
-class SkTextMapStateProc {
-public:
-    SkTextMapStateProc(const SkMatrix& matrix, const SkPoint& offset, int scalarsPerPosition)
-        : fMatrix(matrix)
-        , fProc(SkMatrixPriv::GetMapXYProc(matrix))
-        , fOffset(offset)
-        , fScaleX(fMatrix.getScaleX()) {
-        SkASSERT(1 == scalarsPerPosition || 2 == scalarsPerPosition);
-        if (1 == scalarsPerPosition) {
-            unsigned mtype = fMatrix.getType();
-            if (mtype & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)) {
-                fMapCase = kX;
-            } else {
-                // Bake the matrix scale/translation components into fOffset,
-                // to expedite proc computations.
-                fOffset.set(offset.x() * fMatrix.getScaleX() + fMatrix.getTranslateX(),
-                            offset.y() * fMatrix.getScaleY() + fMatrix.getTranslateY());
-
-                if (mtype & SkMatrix::kScale_Mask) {
-                    fMapCase = kOnlyScaleX;
-                } else {
-                    fMapCase = kOnlyTransX;
-                }
-            }
-        } else {
-            fMapCase = kXY;
-        }
-    }
-
-    void operator()(const SkScalar pos[], SkPoint* loc) const;
-
-private:
-    const SkMatrix& fMatrix;
-    enum {
-        kXY,
-        kOnlyScaleX,
-        kOnlyTransX,
-        kX
-    } fMapCase;
-    const SkMatrixPriv::MapXYProc fProc;
-    SkPoint  fOffset; // In kOnly* mode, this includes the matrix translation component.
-    SkScalar fScaleX; // This is only used by kOnly... cases.
-};
-
-inline void SkTextMapStateProc::operator()(const SkScalar pos[], SkPoint* loc) const {
-    switch(fMapCase) {
-    case kXY:
-        fProc(fMatrix, pos[0] + fOffset.x(), pos[1] + fOffset.y(), loc);
-        break;
-    case kOnlyScaleX:
-        loc->set(fScaleX * *pos + fOffset.x(), fOffset.y());
-        break;
-    case kOnlyTransX:
-        loc->set(*pos + fOffset.x(), fOffset.y());
-        break;
-    default:
-        SkASSERT(false);
-    case kX:
-        fProc(fMatrix, *pos + fOffset.x(), fOffset.y(), loc);
-        break;
-    }
-}
-
-#endif
diff --git a/src/gpu/text/GrTextContext.cpp b/src/gpu/text/GrTextContext.cpp
index d51d482..7ef44bf 100644
--- a/src/gpu/text/GrTextContext.cpp
+++ b/src/gpu/text/GrTextContext.cpp
@@ -22,7 +22,6 @@
 #include "SkMakeUnique.h"
 #include "SkMaskFilterBase.h"
 #include "SkPaintPriv.h"
-#include "SkTextMapStateProc.h"
 #include "SkTo.h"
 #include "ops/GrMeshDrawOp.h"