Remove GrPath typedef

Review URL: http://codereview.appspot.com/6128045/



git-svn-id: http://skia.googlecode.com/svn/trunk@3780 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 28aeef1..ca7ecdc 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -200,7 +200,7 @@
     }
 }
 
-inline SkPath::Direction get_direction(const GrPath& path, const GrMatrix& m) {
+inline SkPath::Direction get_direction(const SkPath& path, const GrMatrix& m) {
     SkPath::Direction dir;
     GR_DEBUGCODE(bool succeeded = )
     path.cheapComputeDirection(&dir);
@@ -220,7 +220,7 @@
     return dir;
 }
 
-bool get_segments(const GrPath& path,
+bool get_segments(const SkPath& path,
                   const GrMatrix& m,
                   SegmentArray* segments,
                   SkPoint* fanPt,
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index be6e19e..027ec5b 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -235,7 +235,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 bool GrClipMaskManager::drawPath(GrGpu* gpu,
-                                 const GrPath& path,
+                                 const SkPath& path,
                                  GrPathFill fill,
                                  bool doAA) {
 
@@ -545,7 +545,7 @@
             SkRegion::Op op = (c == start) ? startOp : clipCopy.getOp(c);
 
             GrPathRenderer* pr = NULL;
-            const GrPath* clipPath = NULL;
+            const SkPath* clipPath = NULL;
             if (kRect_ClipType == clipCopy.getElementType(c)) {
                 canRenderDirectToStencil = true;
                 fill = kEvenOdd_PathFill;
@@ -639,7 +639,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 GrPathRenderer* GrClipMaskManager::getClipPathRenderer(GrGpu* gpu,
-                                                       const GrPath& path,
+                                                       const SkPath& path,
                                                        GrPathFill fill,
                                                        bool antiAlias) {
     if (NULL == fPathRendererChain) {
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h
index 3e7b88e..e698791 100644
--- a/src/gpu/GrClipMaskManager.h
+++ b/src/gpu/GrClipMaskManager.h
@@ -10,7 +10,7 @@
 #define GrClipMaskManager_DEFINED
 
 #include "GrRect.h"
-#include "GrPath.h"
+#include "SkPath.h"
 
 class GrGpu;
 class GrClip;
@@ -79,7 +79,7 @@
     bool createAlphaClipMask(GrGpu* gpu, const GrClip& clipIn);
 
     bool drawPath(GrGpu* gpu,
-                  const GrPath& path,
+                  const SkPath& path,
                   GrPathFill fill,
                   bool doAA);
 
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 7ee2b71..835ab23 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1293,7 +1293,7 @@
 // path bounds will be a subset of the clip bounds. returns false if 
 // path bounds would be empty.
 bool get_path_and_clip_bounds(const GrDrawTarget* target,
-                              const GrPath& path,
+                              const SkPath& path,
                               const GrVec* translate,
                               GrIRect* pathBounds,
                               GrIRect* clipBounds) {
@@ -1336,7 +1336,7 @@
  * scratch texture.
  */
 
-bool sw_draw_path_to_mask_texture(const GrPath& clientPath,
+bool sw_draw_path_to_mask_texture(const SkPath& clientPath,
                                   const GrIRect& pathDevBounds,
                                   GrPathFill fill,
                                   GrContext* context,
@@ -1606,7 +1606,7 @@
     return false;
 }
 
-void GrContext::drawPath(const GrPaint& paint, const GrPath& path,
+void GrContext::drawPath(const GrPaint& paint, const SkPath& path,
                          GrPathFill fill, const GrPoint* translate) {
 
     if (path.isEmpty()) {
@@ -1629,7 +1629,7 @@
     internalDrawPath(paint, path, fill, translate);
 }
 
-void GrContext::internalDrawPath(const GrPaint& paint, const GrPath& path,
+void GrContext::internalDrawPath(const GrPaint& paint, const SkPath& path,
                                  GrPathFill fill, const GrPoint* translate) {
 
     // Note that below we may sw-rasterize the path into a scratch texture.
@@ -2113,7 +2113,7 @@
     return target;
 }
 
-GrPathRenderer* GrContext::getPathRenderer(const GrPath& path,
+GrPathRenderer* GrContext::getPathRenderer(const SkPath& path,
                                            GrPathFill fill,
                                            const GrDrawTarget* target,
                                            bool antiAlias) {
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp
index b164131..27e3fa8 100644
--- a/src/gpu/GrDefaultPathRenderer.cpp
+++ b/src/gpu/GrDefaultPathRenderer.cpp
@@ -150,7 +150,7 @@
 
 #define STENCIL_OFF     0   // Always disable stencil (even when needed)
 
-static inline bool single_pass_path(const GrPath& path, GrPathFill fill) {
+static inline bool single_pass_path(const SkPath& path, GrPathFill fill) {
 #if STENCIL_OFF
     return true;
 #else
diff --git a/src/gpu/GrDefaultTextContext.cpp b/src/gpu/GrDefaultTextContext.cpp
index a606dd5..3bb8543 100644
--- a/src/gpu/GrDefaultTextContext.cpp
+++ b/src/gpu/GrDefaultTextContext.cpp
@@ -220,7 +220,7 @@
         }
 
         if (NULL == glyph->fPath) {
-            GrPath* path = new GrPath;
+            SkPath* path = new SkPath;
             if (!scaler->getGlyphPath(glyph->glyphID(), path)) {
                 // flag the glyph as being dead?
                 delete path;
diff --git a/src/gpu/GrPathUtils.cpp b/src/gpu/GrPathUtils.cpp
index cecc514..aa18792 100644
--- a/src/gpu/GrPathUtils.cpp
+++ b/src/gpu/GrPathUtils.cpp
@@ -145,7 +145,7 @@
     return a + b;
 }
 
-int GrPathUtils::worstCasePointCount(const GrPath& path, int* subpaths,
+int GrPathUtils::worstCasePointCount(const SkPath& path, int* subpaths,
                                      GrScalar tol) {
     if (tol < gMinCurveTol) {
         tol = gMinCurveTol;
diff --git a/src/gpu/GrPathUtils.h b/src/gpu/GrPathUtils.h
index 403f03a..a1d0eb6 100644
--- a/src/gpu/GrPathUtils.h
+++ b/src/gpu/GrPathUtils.h
@@ -11,7 +11,7 @@
 #define GrPathUtils_DEFINED
 
 #include "GrMatrix.h"
-#include "GrPath.h"
+#include "SkPath.h"
 #include "SkTArray.h"
 
 /**
@@ -24,7 +24,7 @@
 
     /// Since we divide by tol if we're computing exact worst-case bounds,
     /// very small tolerances will be increased to gMinCurveTol.
-    int worstCasePointCount(const GrPath&,
+    int worstCasePointCount(const SkPath&,
                             int* subpaths,
                             GrScalar tol);
 
diff --git a/src/gpu/SkGrFontScaler.cpp b/src/gpu/SkGrFontScaler.cpp
index 95c29ff..d2e099b 100644
--- a/src/gpu/SkGrFontScaler.cpp
+++ b/src/gpu/SkGrFontScaler.cpp
@@ -159,7 +159,7 @@
 }
 
 // we should just return const SkPath* (NULL means false)
-bool SkGrFontScaler::getGlyphPath(uint16_t glyphID, GrPath* path) {
+bool SkGrFontScaler::getGlyphPath(uint16_t glyphID, SkPath* path) {
 
     const SkGlyph& glyph = fStrike->getGlyphIDMetrics(glyphID);
     const SkPath* skPath = fStrike->findPath(glyph);
diff --git a/src/gpu/gr_unittests.cpp b/src/gpu/gr_unittests.cpp
index 6e51e19..4adc7e9 100644
--- a/src/gpu/gr_unittests.cpp
+++ b/src/gpu/gr_unittests.cpp
@@ -11,7 +11,6 @@
 #include "GrBinHashKey.h"
 #include "GrDrawTarget.h"
 #include "GrMatrix.h"
-#include "GrPath.h"
 #include "GrRedBlackTree.h"
 #include "GrTDArray.h"
 
@@ -102,130 +101,11 @@
     GrAssert(keyA.getHash() != keyB.getHash());    
 }
 
-static void test_convex() {
-#if 0
-    GrPath testPath;
-    GrPath::Iter testIter;
-    
-    GrPath pt;
-    pt.moveTo(0, 0);
-    pt.close();
-    
-    testIter.reset(pt);
-    testPath.resetFromIter(&testIter);
-    GrAssert(kConvex_ConvexHint == testPath.getConvexHint());
-    
-    GrPath line;
-    line.moveTo(GrIntToScalar(12), GrIntToScalar(20));
-    line.lineTo(GrIntToScalar(-12), GrIntToScalar(-20));
-    line.close();
-    
-    testIter.reset(line);
-    testPath.resetFromIter(&testIter);
-    GrAssert(kConvex_ConvexHint == testPath.getConvexHint());
-    
-    GrPath triLeft;
-    triLeft.moveTo(0, 0);
-    triLeft.lineTo(1, 0);
-    triLeft.lineTo(1, 1);
-    triLeft.close();
-    
-    testIter.reset(triLeft);
-    testPath.resetFromIter(&testIter);
-    GrAssert(kConvex_ConvexHint == testPath.getConvexHint());
-    
-    GrPath triRight;
-    triRight.moveTo(0, 0);
-    triRight.lineTo(-1, 0);
-    triRight.lineTo(1, 1);
-    triRight.close();
-    
-    testIter.reset(triRight);
-    testPath.resetFromIter(&testIter);
-    GrAssert(kConvex_ConvexHint == testPath.getConvexHint());
-    
-    GrPath square;
-    square.moveTo(0, 0);
-    square.lineTo(1, 0);
-    square.lineTo(1, 1);
-    square.lineTo(0, 1);
-    square.close();
-    
-    testIter.reset(square);
-    testPath.resetFromIter(&testIter);
-    GrAssert(kConvex_ConvexHint == testPath.getConvexHint());
-    
-    GrPath redundantSquare;
-    square.moveTo(0, 0);
-    square.lineTo(0, 0);
-    square.lineTo(0, 0);
-    square.lineTo(1, 0);
-    square.lineTo(1, 0);
-    square.lineTo(1, 0);
-    square.lineTo(1, 1);
-    square.lineTo(1, 1);
-    square.lineTo(1, 1);
-    square.lineTo(0, 1);
-    square.lineTo(0, 1);
-    square.lineTo(0, 1);
-    square.close();
-    
-    testIter.reset(redundantSquare);
-    testPath.resetFromIter(&testIter);
-    GrAssert(kConvex_ConvexHint == testPath.getConvexHint());
-    
-    GrPath bowTie;
-    bowTie.moveTo(0, 0);
-    bowTie.lineTo(0, 0);
-    bowTie.lineTo(0, 0);
-    bowTie.lineTo(1, 1);
-    bowTie.lineTo(1, 1);
-    bowTie.lineTo(1, 1);
-    bowTie.lineTo(1, 0);
-    bowTie.lineTo(1, 0);
-    bowTie.lineTo(1, 0);
-    bowTie.lineTo(0, 1);
-    bowTie.lineTo(0, 1);
-    bowTie.lineTo(0, 1);
-    bowTie.close();
-    
-    testIter.reset(bowTie);
-    testPath.resetFromIter(&testIter);
-    GrAssert(kConcave_ConvexHint == testPath.getConvexHint());
-    
-    GrPath spiral;
-    spiral.moveTo(0, 0);
-    spiral.lineTo(1, 0);
-    spiral.lineTo(1, 1);
-    spiral.lineTo(0, 1);
-    spiral.lineTo(0,.5);
-    spiral.lineTo(.5,.5);
-    spiral.lineTo(.5,.75);
-    spiral.close();
-    
-    testIter.reset(spiral);
-    testPath.resetFromIter(&testIter);
-    GrAssert(kConcave_ConvexHint == testPath.getConvexHint());
-    
-    GrPath dent;
-    dent.moveTo(0, 0);
-    dent.lineTo(1, 1);
-    dent.lineTo(0, 1);
-    dent.lineTo(-.5,2);
-    dent.lineTo(-2, 1);
-    dent.close();
-    
-    testIter.reset(dent);
-    testPath.resetFromIter(&testIter);
-    GrAssert(kConcave_ConvexHint == testPath.getConvexHint());
-#endif
-}
 
 void gr_run_unittests() {
     test_tdarray();
     test_bsearch();
     test_binHashKey();
-    test_convex();
     GrRedBlackTree<int>::UnitTest();
     GrDrawTarget::VertexLayoutUnitTest();
 }