Rename viewMatrix to drawMatrix, initialMatrix, or currentMatrix

The viewMatrix has three different uses.
* drawMatrix is the matrix passed in by the drawTextBlob.
* initialMatrix is drawMatrix this a blob was created with.
* currentMatrix describes what stored in the SubRun.

Change-Id: Idd547f079950385485a279d22728f03145d5a77f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259834
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index 7ee8195..fe734c6 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -87,11 +87,11 @@
     if (this->usesDistanceFields()) {
         bool isLCD = this->isLCD();
 
-        const SkMatrix& viewMatrix = geo.fViewMatrix;
+        const SkMatrix& drawMatrix = geo.fDrawMatrix;
 
-        fDFGPFlags = viewMatrix.isSimilarity() ? kSimilarity_DistanceFieldEffectFlag : 0;
-        fDFGPFlags |= viewMatrix.isScaleTranslate() ? kScaleOnly_DistanceFieldEffectFlag : 0;
-        fDFGPFlags |= viewMatrix.hasPerspective() ? kPerspective_DistanceFieldEffectFlag : 0;
+        fDFGPFlags = drawMatrix.isSimilarity() ? kSimilarity_DistanceFieldEffectFlag : 0;
+        fDFGPFlags |= drawMatrix.isScaleTranslate() ? kScaleOnly_DistanceFieldEffectFlag : 0;
+        fDFGPFlags |= drawMatrix.hasPerspective() ? kPerspective_DistanceFieldEffectFlag : 0;
         fDFGPFlags |= fUseGammaCorrectDistanceTable ? kGammaCorrect_DistanceFieldEffectFlag : 0;
         fDFGPFlags |= (kAliasedDistanceField_MaskType == fMaskType)
                               ? kAliased_DistanceFieldEffectFlag
@@ -107,7 +107,7 @@
     }
 
     SkRect bounds;
-    geo.fBlob->computeSubRunBounds(&bounds, *geo.fSubRunPtr, geo.fViewMatrix, geo.fX, geo.fY,
+    geo.fBlob->computeSubRunBounds(&bounds, *geo.fSubRunPtr, geo.fDrawMatrix, geo.fX, geo.fY,
                                    fNeedsGlyphTransform);
     // We don't have tight bounds on the glyph paths in device space. For the purposes of bounds
     // we treat this as a set of non-AA rects rendered with a texture.
@@ -281,7 +281,7 @@
     // if we have RGB, then we won't have any SkShaders so no need to use a localmatrix.
     // TODO actually only invert if we don't have RGBA
     SkMatrix localMatrix;
-    if (this->usesLocalCoords() && !fGeoData[0].fViewMatrix.invert(&localMatrix)) {
+    if (this->usesLocalCoords() && !fGeoData[0].fDrawMatrix.invert(&localMatrix)) {
         return;
     }
 
@@ -313,7 +313,7 @@
     FlushInfo flushInfo;
     flushInfo.fFixedDynamicState = fixedDynamicState;
 
-    bool vmPerspective = fGeoData[0].fViewMatrix.hasPerspective();
+    bool vmPerspective = fGeoData[0].fDrawMatrix.hasPerspective();
     if (this->usesDistanceFields()) {
         flushInfo.fGeometryProcessor = this->setupDfProcessor(target->allocator(),
                                                               *target->caps().shaderCaps(),
@@ -346,7 +346,7 @@
         const Geometry& args = fGeoData[i];
         // TODO4F: Preserve float colors
         GrTextBlob::VertexRegenerator regenerator(
-                resourceProvider, args.fSubRunPtr, args.fViewMatrix, args.fX, args.fY,
+                resourceProvider, args.fSubRunPtr, args.fDrawMatrix, args.fX, args.fY,
                 args.fColor.toBytes_RGBA(), target->deferredUploadTarget(), glyphCache,
                 atlasManager);
         bool done = false;
@@ -366,19 +366,19 @@
                 clip_quads(args.fClipRect, currVertex, result.fFirstVertex, vertexStride,
                            result.fGlyphsRegenerated);
             }
-            if (fNeedsGlyphTransform && !args.fViewMatrix.isIdentity()) {
+            if (fNeedsGlyphTransform && !args.fDrawMatrix.isIdentity()) {
                 // We always do the distance field view matrix transformation after copying rather
                 // than during blob vertex generation time in the blob as handling successive
                 // arbitrary transformations would be complicated and accumulate error.
-                if (args.fViewMatrix.hasPerspective()) {
+                if (args.fDrawMatrix.hasPerspective()) {
                     auto* pos = reinterpret_cast<SkPoint3*>(currVertex);
                     SkMatrixPriv::MapHomogeneousPointsWithStride(
-                            args.fViewMatrix, pos, vertexStride, pos, vertexStride,
+                            args.fDrawMatrix, pos, vertexStride, pos, vertexStride,
                             result.fGlyphsRegenerated * kVerticesPerGlyph);
                 } else {
                     auto* pos = reinterpret_cast<SkPoint*>(currVertex);
                     SkMatrixPriv::MapPointsWithStride(
-                            args.fViewMatrix, pos, vertexStride,
+                            args.fDrawMatrix, pos, vertexStride,
                             result.fGlyphsRegenerated * kVerticesPerGlyph);
                 }
             }
@@ -462,8 +462,8 @@
         return CombineResult::kCannotCombine;
     }
 
-    const SkMatrix& thisFirstMatrix = fGeoData[0].fViewMatrix;
-    const SkMatrix& thatFirstMatrix = that->fGeoData[0].fViewMatrix;
+    const SkMatrix& thisFirstMatrix = fGeoData[0].fDrawMatrix;
+    const SkMatrix& thatFirstMatrix = that->fGeoData[0].fDrawMatrix;
 
     if (this->usesLocalCoords() && !thisFirstMatrix.cheapEqualTo(thatFirstMatrix)) {
         return CombineResult::kCannotCombine;
@@ -540,7 +540,7 @@
     SkMatrix localMatrix = SkMatrix::I();
     if (this->usesLocalCoords()) {
         // If this fails we'll just use I().
-        bool result = fGeoData[0].fViewMatrix.invert(&localMatrix);
+        bool result = fGeoData[0].fDrawMatrix.invert(&localMatrix);
         (void)result;
     }