Add a 'pathMatrix' to GrPathTessellator::prepare

The pathMatrix is applied on the CPU while the geometry is being
written out. It is a tool for batching, and is applied in addition to
the shader's on-GPU matrix. This CL also updates GrPathStencilCoverOp
do do all its path transformations with pathMatrix on the CPU side.
The next step will be for atlases to use the pathMatrix instead of
creating uber paths.

Bug: skia:12258
Change-Id: Ib924dfb06a2c0eed8f9045adc6ae9eefad510082
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433236
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/samplecode/SamplePathTessellators.cpp b/samplecode/SamplePathTessellators.cpp
index 8b847c1..b355592 100644
--- a/samplecode/SamplePathTessellators.cpp
+++ b/samplecode/SamplePathTessellators.cpp
@@ -71,6 +71,8 @@
     void onPrepare(GrOpFlushState* flushState) override {
         constexpr static SkPMColor4f kCyan = {0,1,1,1};
         auto alloc = flushState->allocator();
+        const SkMatrix& shaderMatrix = SkMatrix::I();
+        const SkMatrix& pathMatrix = fMatrix;
         const GrCaps& caps = flushState->caps();
         int numVerbsToGetMiddleOut = 0;
         int numVerbsToGetTessellation = caps.minPathVerbsForHwTessellation();
@@ -79,29 +81,29 @@
         switch (fMode) {
             using DrawInnerFan = GrPathCurveTessellator::DrawInnerFan;
             case Mode::kWedgeMiddleOut:
-                fTessellator = GrPathWedgeTessellator::Make(alloc, fMatrix, kCyan,
+                fTessellator = GrPathWedgeTessellator::Make(alloc, shaderMatrix, kCyan,
                                                             numVerbsToGetMiddleOut, *pipeline,
                                                             caps);
                 break;
             case Mode::kCurveMiddleOut:
-                fTessellator = GrPathCurveTessellator::Make(alloc, fMatrix, kCyan,
+                fTessellator = GrPathCurveTessellator::Make(alloc, shaderMatrix, kCyan,
                                                             DrawInnerFan::kYes,
                                                             numVerbsToGetMiddleOut, *pipeline,
                                                             caps);
                 break;
             case Mode::kWedgeTessellate:
-                fTessellator = GrPathWedgeTessellator::Make(alloc, fMatrix, kCyan,
+                fTessellator = GrPathWedgeTessellator::Make(alloc, shaderMatrix, kCyan,
                                                             numVerbsToGetTessellation, *pipeline,
                                                             caps);
                 break;
             case Mode::kCurveTessellate:
-                fTessellator = GrPathCurveTessellator::Make(alloc, fMatrix, kCyan,
+                fTessellator = GrPathCurveTessellator::Make(alloc, shaderMatrix, kCyan,
                                                             DrawInnerFan::kYes,
                                                             numVerbsToGetTessellation, *pipeline,
                                                             caps);
                 break;
         }
-        fTessellator->prepare(flushState, this->bounds(), fPath);
+        fTessellator->prepare(flushState, this->bounds(), pathMatrix, fPath);
         fProgram = GrTessellationShader::MakeProgram({alloc, flushState->writeView(),
                                                      &flushState->dstProxyView(),
                                                      flushState->renderPassBarriers(),