Rename CPU tessellation to "triangulation"

Ambiguity has come up re: what "tessellation" means in Ganesh. I
believe that, in the context of a graphics library, "tessellation"
should refer to the hardware pipeline feature of submitting patches
and tessellating them on the GPU. This CL therefore renames classes
that triangulate things on the CPU to call it "triangulation".

Change-Id: Ic8515ea6a33000f1b638a852d5122bc9bd6b38f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279236
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/gn/gpu.gni b/gn/gpu.gni
index 1d2fe87..6c2d3af 100644
--- a/gn/gpu.gni
+++ b/gn/gpu.gni
@@ -212,10 +212,10 @@
   "$_src/gpu/GrTracing.h",
   "$_src/gpu/GrTransferFromRenderTask.cpp",
   "$_src/gpu/GrTransferFromRenderTask.h",
-  "$_src/gpu/GrTessellator.cpp",
-  "$_src/gpu/GrTessellator.h",
   "$_src/gpu/GrTestUtils.cpp",
   "$_src/gpu/GrTestUtils.h",
+  "$_src/gpu/GrTriangulator.cpp",
+  "$_src/gpu/GrTriangulator.h",
   "$_src/gpu/GrTexture.cpp",
   "$_src/gpu/GrTexture.h",
   "$_src/gpu/GrTextureAdjuster.cpp",
@@ -299,10 +299,10 @@
   "$_src/gpu/ops/GrSmallPathRenderer.h",
   "$_src/gpu/ops/GrStrokeRectOp.cpp",
   "$_src/gpu/ops/GrStrokeRectOp.h",
-  "$_src/gpu/ops/GrTessellatingPathRenderer.cpp",
-  "$_src/gpu/ops/GrTessellatingPathRenderer.h",
   "$_src/gpu/ops/GrTextureOp.cpp",
   "$_src/gpu/ops/GrTextureOp.h",
+  "$_src/gpu/ops/GrTriangulatingPathRenderer.cpp",
+  "$_src/gpu/ops/GrTriangulatingPathRenderer.h",
 
   "$_src/gpu/effects/GrCoverageSetOpXP.cpp",
   "$_src/gpu/effects/GrCoverageSetOpXP.h",
diff --git a/include/private/GrTypesPriv.h b/include/private/GrTypesPriv.h
index 5a8ab5c..50bacf3 100644
--- a/include/private/GrTypesPriv.h
+++ b/include/private/GrTypesPriv.h
@@ -745,7 +745,7 @@
     kAAConvex          =   1 << 5,
     kAALinearizing     =   1 << 6,
     kSmall             =   1 << 7,
-    kTessellating      =   1 << 8,
+    kTriangulating     =   1 << 8,
     kDefault           = ((1 << 9) - 1) & ~kGpuTessellation  // All but kGpuTessellation.
 };
 
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp
index 54fc45a..11c3d46 100644
--- a/src/gpu/GrPathRendererChain.cpp
+++ b/src/gpu/GrPathRendererChain.cpp
@@ -23,7 +23,7 @@
 #include "src/gpu/ops/GrDefaultPathRenderer.h"
 #include "src/gpu/ops/GrSmallPathRenderer.h"
 #include "src/gpu/ops/GrStencilAndCoverPathRenderer.h"
-#include "src/gpu/ops/GrTessellatingPathRenderer.h"
+#include "src/gpu/ops/GrTriangulatingPathRenderer.h"
 #include "src/gpu/tessellate/GrGpuTessellationPathRenderer.h"
 
 GrPathRendererChain::GrPathRendererChain(GrRecordingContext* context, const Options& options) {
@@ -74,8 +74,8 @@
             }
         }
     }
-    if (options.fGpuPathRenderers & GpuPathRenderers::kTessellating) {
-        fChain.push_back(sk_make_sp<GrTessellatingPathRenderer>());
+    if (options.fGpuPathRenderers & GpuPathRenderers::kTriangulating) {
+        fChain.push_back(sk_make_sp<GrTriangulatingPathRenderer>());
     }
 
     // We always include the default path renderer (as well as SW), so we can draw any path
diff --git a/src/gpu/GrRenderTargetContext.h b/src/gpu/GrRenderTargetContext.h
index 2070e46..b88cd73 100644
--- a/src/gpu/GrRenderTargetContext.h
+++ b/src/gpu/GrRenderTargetContext.h
@@ -602,7 +602,7 @@
     friend class GrSmallPathRenderer;                // for access to add[Mesh]DrawOp
     friend class GrDefaultPathRenderer;              // for access to add[Mesh]DrawOp
     friend class GrStencilAndCoverPathRenderer;      // for access to add[Mesh]DrawOp
-    friend class GrTessellatingPathRenderer;         // for access to add[Mesh]DrawOp
+    friend class GrTriangulatingPathRenderer;        // for access to add[Mesh]DrawOp
     friend class GrCCPerFlushResources;              // for access to addDrawOp
     friend class GrCoverageCountingPathRenderer;     // for access to addDrawOp
     friend class GrFillRectOp;                       // for access to addDrawOp
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTriangulator.cpp
similarity index 99%
rename from src/gpu/GrTessellator.cpp
rename to src/gpu/GrTriangulator.cpp
index 5cc8339..42731d2 100644
--- a/src/gpu/GrTessellator.cpp
+++ b/src/gpu/GrTriangulator.cpp
@@ -5,7 +5,7 @@
  * found in the LICENSE file.
  */
 
-#include "src/gpu/GrTessellator.h"
+#include "src/gpu/GrTriangulator.h"
 
 #include "src/gpu/GrEagerVertexAllocator.h"
 #include "src/gpu/GrVertexWriter.h"
@@ -96,7 +96,7 @@
 
 namespace {
 
-using GrTessellator::Mode;
+using GrTriangulator::Mode;
 
 const int kArenaChunkSize = 16 * 1024;
 const float kCosMiterAngle = 0.97f; // Corresponds to an angle of ~14 degrees.
@@ -2421,7 +2421,7 @@
     int64_t count = 0;
     for (Poly* poly = polys; poly; poly = poly->fNext) {
         if (apply_fill_type(fillType, poly) && poly->fCount >= 3) {
-            count += (poly->fCount - 2) * (TESSELLATOR_WIREFRAME ? 6 : 3);
+            count += (poly->fCount - 2) * (TRIANGULATOR_WIREFRAME ? 6 : 3);
         }
     }
     return count;
@@ -2431,7 +2431,7 @@
     int64_t count = 0;
     for (Vertex* v = outerMesh.fHead; v; v = v->fNext) {
         for (Edge* e = v->fFirstEdgeBelow; e; e = e->fNextEdgeBelow) {
-            count += TESSELLATOR_WIREFRAME ? 12 : 6;
+            count += TRIANGULATOR_WIREFRAME ? 12 : 6;
         }
     }
     return count;
@@ -2453,7 +2453,7 @@
 
 } // namespace
 
-namespace GrTessellator {
+namespace GrTriangulator {
 
 // Stage 6: Triangulate the monotone polygons into a vertex buffer.
 
@@ -2498,7 +2498,7 @@
 }
 
 int PathToVertices(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds,
-                   GrTessellator::WindingVertex** verts) {
+                   WindingVertex** verts) {
     int contourCnt = get_contour_count(path, tolerance);
     if (contourCnt <= 0) {
         *verts = nullptr;
@@ -2516,8 +2516,8 @@
     }
     int count = count64;
 
-    *verts = new GrTessellator::WindingVertex[count];
-    GrTessellator::WindingVertex* vertsEnd = *verts;
+    *verts = new WindingVertex[count];
+    WindingVertex* vertsEnd = *verts;
     SkPoint* points = new SkPoint[count];
     SkPoint* pointsEnd = points;
     for (Poly* poly = polys; poly; poly = poly->fNext) {
diff --git a/src/gpu/GrTessellator.h b/src/gpu/GrTriangulator.h
similarity index 88%
rename from src/gpu/GrTessellator.h
rename to src/gpu/GrTriangulator.h
index 3a5fd54..9538919 100644
--- a/src/gpu/GrTessellator.h
+++ b/src/gpu/GrTriangulator.h
@@ -5,8 +5,8 @@
  * found in the LICENSE file.
  */
 
-#ifndef GrTessellator_DEFINED
-#define GrTessellator_DEFINED
+#ifndef GrTriangulator_DEFINED
+#define GrTriangulator_DEFINED
 
 #include "include/core/SkPoint.h"
 #include "include/private/SkColorData.h"
@@ -20,9 +20,9 @@
  * Provides utility functions for converting paths to a collection of triangles.
  */
 
-#define TESSELLATOR_WIREFRAME 0
+#define TRIANGULATOR_WIREFRAME 0
 
-namespace GrTessellator {
+namespace GrTriangulator {
 
 struct WindingVertex {
     SkPoint fPos;
@@ -42,7 +42,7 @@
     // Surround path edges with coverage ramps for antialiasing.
     kEdgeAntialias,
 
-    // Tessellate only each contour's inner polygon. The inner polygons connect the endpoints of
+    // Triangulate only each contour's inner polygon. The inner polygons connect the endpoints of
     // each verb. (i.e., they are the path that would result from collapsing all curves to single
     // lines.)
     //
diff --git a/src/gpu/ccpr/GrCCFiller.cpp b/src/gpu/ccpr/GrCCFiller.cpp
index 3816fb6..ee9520f 100644
--- a/src/gpu/ccpr/GrCCFiller.cpp
+++ b/src/gpu/ccpr/GrCCFiller.cpp
@@ -175,9 +175,9 @@
         }
     }
 
-    GrTessellator::WindingVertex* vertices = nullptr;
+    GrTriangulator::WindingVertex* vertices = nullptr;
     SkASSERT(!fan.isInverseFillType());
-    fFanTessellationCount = GrTessellator::PathToVertices(
+    fFanTessellationCount = GrTriangulator::PathToVertices(
             fan, std::numeric_limits<float>::infinity(), SkRect::Make(clippedDevIBounds),
             &vertices);
     if (fFanTessellationCount <= 0) {
@@ -272,9 +272,10 @@
 }
 
 void GrCCFiller::emitTessellatedFan(
-        const GrTessellator::WindingVertex* vertices, int numVertices, const Sk2f& devToAtlasOffset,
-        TriPointInstance::Ordering ordering, TriPointInstance* triPointInstanceData,
-        QuadPointInstance* quadPointInstanceData, GrCCFillGeometry::PrimitiveTallies* indices) {
+        const GrTriangulator::WindingVertex* vertices, int numVertices,
+        const Sk2f& devToAtlasOffset, TriPointInstance::Ordering ordering,
+        TriPointInstance* triPointInstanceData, QuadPointInstance* quadPointInstanceData,
+        GrCCFillGeometry::PrimitiveTallies* indices) {
     for (int i = 0; i < numVertices; i += 3) {
         int weight = vertices[i].fWinding;
         SkASSERT(weight >= 1);
diff --git a/src/gpu/ccpr/GrCCFiller.h b/src/gpu/ccpr/GrCCFiller.h
index e69ce20..f90bc85 100644
--- a/src/gpu/ccpr/GrCCFiller.h
+++ b/src/gpu/ccpr/GrCCFiller.h
@@ -11,7 +11,7 @@
 #include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
 #include "src/core/SkPathPriv.h"
-#include "src/gpu/GrTessellator.h"
+#include "src/gpu/GrTriangulator.h"
 #include "src/gpu/ccpr/GrAutoMapVertexBuffer.h"
 #include "src/gpu/ccpr/GrCCCoverageProcessor.h"
 #include "src/gpu/ccpr/GrCCFillGeometry.h"
@@ -72,7 +72,7 @@
             SkASSERT(this->hasFanTessellation());
             return fFanTessellationCount;
         }
-        const GrTessellator::WindingVertex* fanTessellation() const {
+        const GrTriangulator::WindingVertex* fanTessellation() const {
             SkASSERT(this->hasFanTessellation());
             return fFanTessellation.get();
         }
@@ -84,7 +84,7 @@
         GrScissorTest fScissorTest;
         SkIVector fDevToAtlasOffset;  // Translation from device space to location in atlas.
         int fFanTessellationCount = -1;
-        std::unique_ptr<const GrTessellator::WindingVertex[]> fFanTessellation;
+        std::unique_ptr<const GrTriangulator::WindingVertex[]> fFanTessellation;
     };
 
     // Defines a batch of CCPR primitives. Start indices are deduced by looking at the previous
@@ -103,7 +103,7 @@
     };
 
     void emitTessellatedFan(
-            const GrTessellator::WindingVertex*, int numVertices, const Sk2f& devToAtlasOffset,
+            const GrTriangulator::WindingVertex*, int numVertices, const Sk2f& devToAtlasOffset,
             GrCCCoverageProcessor::TriPointInstance::Ordering,
             GrCCCoverageProcessor::TriPointInstance*, GrCCCoverageProcessor::QuadPointInstance*,
             GrCCFillGeometry::PrimitiveTallies*);
diff --git a/src/gpu/ops/GrTessellatingPathRenderer.cpp b/src/gpu/ops/GrTriangulatingPathRenderer.cpp
similarity index 85%
rename from src/gpu/ops/GrTessellatingPathRenderer.cpp
rename to src/gpu/ops/GrTriangulatingPathRenderer.cpp
index c6a1a42..d1e560d 100644
--- a/src/gpu/ops/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/ops/GrTriangulatingPathRenderer.cpp
@@ -5,7 +5,7 @@
  * found in the LICENSE file.
  */
 
-#include "src/gpu/ops/GrTessellatingPathRenderer.h"
+#include "src/gpu/ops/GrTriangulatingPathRenderer.h"
 
 #include "include/private/SkIDChangeListener.h"
 #include "src/core/SkGeometry.h"
@@ -21,22 +21,22 @@
 #include "src/gpu/GrResourceProvider.h"
 #include "src/gpu/GrSimpleMesh.h"
 #include "src/gpu/GrStyle.h"
-#include "src/gpu/GrTessellator.h"
+#include "src/gpu/GrTriangulator.h"
 #include "src/gpu/geometry/GrPathUtils.h"
 #include "src/gpu/geometry/GrShape.h"
 #include "src/gpu/ops/GrMeshDrawOp.h"
 #include "src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h"
 
-#include <stdio.h>
+#include <cstdio>
 
 #ifndef GR_AA_TESSELLATOR_MAX_VERB_COUNT
 #define GR_AA_TESSELLATOR_MAX_VERB_COUNT 10
 #endif
 
 /*
- * This path renderer tessellates the path into triangles using GrTessellator, uploads the
- * triangles to a vertex buffer, and renders them with a single draw call. It can do screenspace
- * antialiasing with a one-pixel coverage ramp.
+ * This path renderer linearizes and decomposes the path into triangles using GrTriangulator,
+ * uploads the triangles to a vertex buffer, and renders them with a single draw call. It can do
+ * screenspace antialiasing with a one-pixel coverage ramp.
  */
 namespace {
 
@@ -123,12 +123,12 @@
 
 }  // namespace
 
-GrTessellatingPathRenderer::GrTessellatingPathRenderer()
+GrTriangulatingPathRenderer::GrTriangulatingPathRenderer()
   : fMaxVerbCount(GR_AA_TESSELLATOR_MAX_VERB_COUNT) {
 }
 
 GrPathRenderer::CanDrawPath
-GrTessellatingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
+GrTriangulatingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
     // This path renderer can draw fill styles, and can do screenspace antialiasing via a
     // one-pixel coverage ramp. It can do convex and concave paths, but we'll leave the convex
     // ones to simpler algorithms. We pass on paths that have styles, though they may come back
@@ -161,7 +161,7 @@
 
 namespace {
 
-class TessellatingPathOp final : public GrMeshDrawOp {
+class TriangulatingPathOp final : public GrMeshDrawOp {
 private:
     using Helper = GrSimpleMeshDrawOpHelperWithStencil;
 
@@ -175,12 +175,12 @@
                                           SkIRect devClipBounds,
                                           GrAAType aaType,
                                           const GrUserStencilSettings* stencilSettings) {
-        return Helper::FactoryHelper<TessellatingPathOp>(context, std::move(paint), shape,
-                                                         viewMatrix, devClipBounds,
-                                                         aaType, stencilSettings);
+        return Helper::FactoryHelper<TriangulatingPathOp>(context, std::move(paint), shape,
+                                                          viewMatrix, devClipBounds, aaType,
+                                                          stencilSettings);
     }
 
-    const char* name() const override { return "TessellatingPathOp"; }
+    const char* name() const override { return "TriangulatingPathOp"; }
 
     void visitProxies(const VisitProxyFunc& func) const override {
         if (fProgramInfo) {
@@ -200,13 +200,13 @@
     }
 #endif
 
-    TessellatingPathOp(Helper::MakeArgs helperArgs,
-                       const SkPMColor4f& color,
-                       const GrShape& shape,
-                       const SkMatrix& viewMatrix,
-                       const SkIRect& devClipBounds,
-                       GrAAType aaType,
-                       const GrUserStencilSettings* stencilSettings)
+    TriangulatingPathOp(Helper::MakeArgs helperArgs,
+                        const SkPMColor4f& color,
+                        const GrShape& shape,
+                        const SkMatrix& viewMatrix,
+                        const SkIRect& devClipBounds,
+                        GrAAType aaType,
+                        const GrUserStencilSettings* stencilSettings)
             : INHERITED(ClassID())
             , fHelper(helperArgs, aaType, stencilSettings)
             , fColor(color)
@@ -283,8 +283,8 @@
         bool isLinear;
         bool canMapVB = GrCaps::kNone_MapFlags != target->caps().mapBufferFlags();
         StaticVertexAllocator allocator(rp, canMapVB);
-        int count = GrTessellator::PathToTriangles(getPath(), tol, clipBounds, &allocator,
-                                                   GrTessellator::Mode::kNormal, &isLinear);
+        int count = GrTriangulator::PathToTriangles(getPath(), tol, clipBounds, &allocator,
+                                                    GrTriangulator::Mode::kNormal, &isLinear);
         if (count == 0) {
             return;
         }
@@ -313,8 +313,8 @@
         int firstVertex;
         bool isLinear;
         GrEagerDynamicVertexAllocator allocator(target, &vertexBuffer, &firstVertex);
-        int count = GrTessellator::PathToTriangles(path, tol, clipBounds, &allocator,
-                                                   GrTessellator::Mode::kEdgeAntialias, &isLinear);
+        int count = GrTriangulator::PathToTriangles(path, tol, clipBounds, &allocator,
+                                                    GrTriangulator::Mode::kEdgeAntialias, &isLinear);
         if (count == 0) {
             return;
         }
@@ -359,13 +359,13 @@
         }
 
 #ifdef SK_DEBUG
-        auto mode = (fAntiAlias) ? GrTessellator::Mode::kEdgeAntialias
-                                 : GrTessellator::Mode::kNormal;
-        SkASSERT(GrTessellator::GetVertexStride(mode) == gp->vertexStride());
+        auto mode = (fAntiAlias) ? GrTriangulator::Mode::kEdgeAntialias
+                                 : GrTriangulator::Mode::kNormal;
+        SkASSERT(GrTriangulator::GetVertexStride(mode) == gp->vertexStride());
 #endif
 
-        GrPrimitiveType primitiveType = TESSELLATOR_WIREFRAME ? GrPrimitiveType::kLines
-                                                              : GrPrimitiveType::kTriangles;
+        GrPrimitiveType primitiveType = TRIANGULATOR_WIREFRAME ? GrPrimitiveType::kLines
+                                                               : GrPrimitiveType::kTriangles;
 
         fProgramInfo =  fHelper.createProgramInfoWithStencil(caps, arena, outputView,
                                                              std::move(appliedClip), dstProxyView,
@@ -414,14 +414,14 @@
 
 }  // anonymous namespace
 
-bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) {
+bool GrTriangulatingPathRenderer::onDrawPath(const DrawPathArgs& args) {
     GR_AUDIT_TRAIL_AUTO_FRAME(args.fRenderTargetContext->auditTrail(),
-                              "GrTessellatingPathRenderer::onDrawPath");
+                              "GrTriangulatingPathRenderer::onDrawPath");
     SkIRect clipBoundsI;
     args.fClip->getConservativeBounds(args.fRenderTargetContext->width(),
                                       args.fRenderTargetContext->height(),
                                       &clipBoundsI);
-    std::unique_ptr<GrDrawOp> op = TessellatingPathOp::Make(
+    std::unique_ptr<GrDrawOp> op = TriangulatingPathOp::Make(
             args.fContext, std::move(args.fPaint), *args.fShape, *args.fViewMatrix, clipBoundsI,
             args.fAAType, args.fUserStencilSettings);
     args.fRenderTargetContext->addDrawOp(*args.fClip, std::move(op));
@@ -432,7 +432,7 @@
 
 #if GR_TEST_UTILS
 
-GR_DRAW_OP_TEST_DEFINE(TesselatingPathOp) {
+GR_DRAW_OP_TEST_DEFINE(TriangulatingPathOp) {
     SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
     SkPath path = GrTest::TestPath(random);
     SkIRect devClipBounds = SkIRect::MakeLTRB(
@@ -448,8 +448,8 @@
         GrTest::TestStyle(random, &style);
     } while (!style.isSimpleFill());
     GrShape shape(path, style);
-    return TessellatingPathOp::Make(context, std::move(paint), shape, viewMatrix, devClipBounds,
-                                    aaType, GrGetRandomStencil(random, context));
+    return TriangulatingPathOp::Make(context, std::move(paint), shape, viewMatrix, devClipBounds,
+                                     aaType, GrGetRandomStencil(random, context));
 }
 
 #endif
diff --git a/src/gpu/ops/GrTessellatingPathRenderer.h b/src/gpu/ops/GrTriangulatingPathRenderer.h
similarity index 80%
rename from src/gpu/ops/GrTessellatingPathRenderer.h
rename to src/gpu/ops/GrTriangulatingPathRenderer.h
index 2ebcd79..7425933 100644
--- a/src/gpu/ops/GrTessellatingPathRenderer.h
+++ b/src/gpu/ops/GrTriangulatingPathRenderer.h
@@ -5,8 +5,8 @@
  * found in the LICENSE file.
  */
 
-#ifndef GrTessellatingPathRenderer_DEFINED
-#define GrTessellatingPathRenderer_DEFINED
+#ifndef GrTriangulatingPathRenderer_DEFINED
+#define GrTriangulatingPathRenderer_DEFINED
 
 #include "src/gpu/GrPathRenderer.h"
 
@@ -14,9 +14,9 @@
  *  Subclass that renders the path by converting to screen-space trapezoids plus
  *   extra 1-pixel geometry for AA.
  */
-class GrTessellatingPathRenderer : public GrPathRenderer {
+class GrTriangulatingPathRenderer : public GrPathRenderer {
 public:
-    GrTessellatingPathRenderer();
+    GrTriangulatingPathRenderer();
 #if GR_TEST_UTILS
     void setMaxVerbCount(int maxVerbCount) { fMaxVerbCount = maxVerbCount; }
 #endif
diff --git a/src/gpu/tessellate/GrTessellatePathOp.cpp b/src/gpu/tessellate/GrTessellatePathOp.cpp
index d42ee6b..e00ff29 100644
--- a/src/gpu/tessellate/GrTessellatePathOp.cpp
+++ b/src/gpu/tessellate/GrTessellatePathOp.cpp
@@ -10,7 +10,7 @@
 #include "src/gpu/GrEagerVertexAllocator.h"
 #include "src/gpu/GrGpu.h"
 #include "src/gpu/GrOpFlushState.h"
-#include "src/gpu/GrTessellator.h"
+#include "src/gpu/GrTriangulator.h"
 #include "src/gpu/tessellate/GrFillPathShader.h"
 #include "src/gpu/tessellate/GrPathParser.h"
 #include "src/gpu/tessellate/GrStencilPathShader.h"
@@ -50,9 +50,9 @@
     if (cpuTessellationWork * 500 + (256 * 256) < gpuFragmentWork) {  // Don't try below 256x256.
         bool pathIsLinear;
         // PathToTriangles(..kSimpleInnerPolygon..) will fail if the inner polygon is not simple.
-        if ((fPathVertexCount = GrTessellator::PathToTriangles(
+        if ((fPathVertexCount = GrTriangulator::PathToTriangles(
                 fPath, 0, SkRect::MakeEmpty(), &pathVertexAllocator,
-                GrTessellator::Mode::kSimpleInnerPolygons, &pathIsLinear))) {
+                GrTriangulator::Mode::kSimpleInnerPolygons, &pathIsLinear))) {
             if (((Flags::kStencilOnly | Flags::kWireframe) & fFlags) ||
                 GrAAType::kCoverage == fAAType ||
                 (state->appliedClip() && state->appliedClip()->hasStencilClip())) {
diff --git a/src/gpu/tessellate/GrTessellatePathOp.h b/src/gpu/tessellate/GrTessellatePathOp.h
index dafa7ab..ee8ff9c 100644
--- a/src/gpu/tessellate/GrTessellatePathOp.h
+++ b/src/gpu/tessellate/GrTessellatePathOp.h
@@ -88,7 +88,7 @@
     // The "path vertex data" is made up of cubic wedges or inner polygon triangles (either red book
     // style or fully tessellated). The geometry is generated by
     // GrPathParser::EmitCenterWedgePatches, GrPathParser::EmitInnerPolygonTriangles,
-    // or GrTessellator::PathToTriangles.
+    // or GrTriangulator::PathToTriangles.
     sk_sp<const GrBuffer> fPathVertexBuffer;
     int fBasePathVertex;
     int fPathVertexCount;
diff --git a/tests/PathRendererCacheTests.cpp b/tests/PathRendererCacheTests.cpp
index edadc34..18ab233 100644
--- a/tests/PathRendererCacheTests.cpp
+++ b/tests/PathRendererCacheTests.cpp
@@ -16,7 +16,7 @@
 #include "src/gpu/GrStyle.h"
 #include "src/gpu/effects/GrPorterDuffXferProcessor.h"
 #include "src/gpu/geometry/GrShape.h"
-#include "src/gpu/ops/GrTessellatingPathRenderer.h"
+#include "src/gpu/ops/GrTriangulatingPathRenderer.h"
 
 static SkPath create_concave_path() {
     SkPath path;
@@ -130,12 +130,12 @@
 }
 
 // Test that deleting the original path invalidates the VBs cached by the tessellating path renderer
-DEF_GPUTEST(TessellatingPathRendererCacheTest, reporter, /* options */) {
+DEF_GPUTEST(TriangulatingPathRendererCacheTest, reporter, /* options */) {
     auto createPR = [](GrContext*) {
-        return new GrTessellatingPathRenderer();
+        return new GrTriangulatingPathRenderer();
     };
 
-    // Tessellating path renderer creates a single vertex buffer for non-AA paths. No other
+    // Triangulating path renderer creates a single vertex buffer for non-AA paths. No other
     // resources should be created.
     const int kExpectedResources = 1;
 
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp
index acd97b1..ce65540 100644
--- a/tests/TessellatingPathRendererTests.cpp
+++ b/tests/TessellatingPathRendererTests.cpp
@@ -15,7 +15,7 @@
 #include "src/gpu/GrStyle.h"
 #include "src/gpu/effects/GrPorterDuffXferProcessor.h"
 #include "src/gpu/geometry/GrShape.h"
-#include "src/gpu/ops/GrTessellatingPathRenderer.h"
+#include "src/gpu/ops/GrTriangulatingPathRenderer.h"
 #include "src/shaders/SkShaderBase.h"
 
 /*
@@ -704,8 +704,8 @@
                       const SkMatrix& matrix = SkMatrix::I(),
                       GrAAType aaType = GrAAType::kNone,
                       std::unique_ptr<GrFragmentProcessor> fp = nullptr) {
-    GrTessellatingPathRenderer tess;
-    tess.setMaxVerbCount(100);
+    GrTriangulatingPathRenderer pr;
+    pr.setMaxVerbCount(100);
 
     GrPaint paint;
     paint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc));
@@ -728,10 +728,10 @@
                                       &shape,
                                       aaType,
                                       false};
-    tess.drawPath(args);
+    pr.drawPath(args);
 }
 
-DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) {
+DEF_GPUTEST_FOR_ALL_CONTEXTS(TriangulatingPathRendererTests, reporter, ctxInfo) {
     GrContext* ctx = ctxInfo.grContext();
     auto rtc = GrRenderTargetContext::Make(
             ctx, GrColorType::kRGBA_8888, nullptr, SkBackingFit::kApprox, {800, 800}, 1,
diff --git a/tools/flags/CommonFlagsGpu.cpp b/tools/flags/CommonFlagsGpu.cpp
index 0aa0682..a509459 100644
--- a/tools/flags/CommonFlagsGpu.cpp
+++ b/tools/flags/CommonFlagsGpu.cpp
@@ -24,7 +24,7 @@
 static DEFINE_string(pr, "",
               "Set of enabled gpu path renderers. Defined as a list of: "
               "[~]none [~]dashline [~]nvpr [~]ccpr [~]aahairline [~]aaconvex [~]aalinearizing "
-              "[~]small [~]tess] [~]all");
+              "[~]small [~]tri] [~]all");
 
 static DEFINE_int(internalSamples, 4,
                   "Number of samples for internal draws that use MSAA or mixed samples.");
@@ -54,8 +54,8 @@
         return GpuPathRenderers::kAALinearizing;
     } else if (!strcmp(name, "small")) {
         return GpuPathRenderers::kSmall;
-    } else if (!strcmp(name, "tess")) {
-        return GpuPathRenderers::kTessellating;
+    } else if (!strcmp(name, "tri")) {
+        return GpuPathRenderers::kTriangulating;
     } else if (!strcmp(name, "default")) {
         return GpuPathRenderers::kDefault;
     }
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index bbac313..2a030d4 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -167,7 +167,7 @@
 DRAW_OP_TEST_EXTERN(SmallPathOp);
 DRAW_OP_TEST_EXTERN(RegionOp);
 DRAW_OP_TEST_EXTERN(RRectOp);
-DRAW_OP_TEST_EXTERN(TesselatingPathOp);
+DRAW_OP_TEST_EXTERN(TriangulatingPathOp);
 DRAW_OP_TEST_EXTERN(TextureOp);
 
 void GrDrawRandomOp(SkRandom* random, GrRenderTargetContext* renderTargetContext, GrPaint&& paint) {
@@ -194,7 +194,7 @@
             DRAW_OP_TEST_ENTRY(SmallPathOp),
             DRAW_OP_TEST_ENTRY(RegionOp),
             DRAW_OP_TEST_ENTRY(RRectOp),
-            DRAW_OP_TEST_ENTRY(TesselatingPathOp),
+            DRAW_OP_TEST_ENTRY(TriangulatingPathOp),
             DRAW_OP_TEST_ENTRY(TextureOp),
     };
 
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 3d51910..6772624 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -43,7 +43,7 @@
 #include "tools/viewer/SvgSlide.h"
 #include "tools/viewer/Viewer.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <map>
 
 #include "imgui.h"
@@ -288,7 +288,7 @@
     gPathRendererNames[GpuPathRenderers::kStencilAndCover] = "NV_path_rendering";
     gPathRendererNames[GpuPathRenderers::kSmall] = "Small paths (cached sdf or alpha masks)";
     gPathRendererNames[GpuPathRenderers::kCoverageCounting] = "CCPR";
-    gPathRendererNames[GpuPathRenderers::kTessellating] = "Tessellating";
+    gPathRendererNames[GpuPathRenderers::kTriangulating] = "Triangulating";
     gPathRendererNames[GpuPathRenderers::kNone] = "Software masks";
 
     SkDebugf("Command line arguments: ");
@@ -1757,7 +1757,7 @@
                             }
                             prButton(GpuPathRenderers::kSmall);
                         }
-                        prButton(GpuPathRenderers::kTessellating);
+                        prButton(GpuPathRenderers::kTriangulating);
                         prButton(GpuPathRenderers::kNone);
                     }
                     ImGui::TreePop();
@@ -2426,7 +2426,7 @@
                     }
                     writer.appendString(gPathRendererNames[GpuPathRenderers::kSmall].c_str());
                 }
-                writer.appendString(gPathRendererNames[GpuPathRenderers::kTessellating].c_str());
+                writer.appendString(gPathRendererNames[GpuPathRenderers::kTriangulating].c_str());
                 writer.appendString(gPathRendererNames[GpuPathRenderers::kNone].c_str());
             }
         });