Revert "Revert "Converted texture and runtime effects to use GrMatrixEffect""

This reverts commit 36a3e014e10850ff692e5fd65e8e4d0354505916.

Change-Id: I2bb432ec423a85478adddc6845d5d7aa59d4055b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284918
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
index 5cfb986..a264d45 100644
--- a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
@@ -131,14 +131,9 @@
                 vb->codeAppendf("%s = %s * %s;", v.vsOut(), matrix.c_str(), localCoordsStr.c_str());
             }
             fsVar = GrShaderVar(SkString(v.fsIn()), v.type(), GrShaderVar::TypeModifier::In);
-            fTransformInfos.push_back({ v.vsOut(), v.type(), matrix.c_str(), localCoordsStr, &fp });
-        } else {
-            SkASSERT(fp.sampleMatrix().fKind != SkSL::SampleMatrix::Kind::kVariable);
-            if (fp.sampleMatrix().fKind == SkSL::SampleMatrix::Kind::kConstantOrUniform) {
-                matrix += " * " + fp.sampleMatrix().fExpression;
-            }
+            fTransformInfos.push_back({ v.vsOut(), v.type(), matrix, localCoordsStr, &fp });
         }
-        handler->specifyCoordsForCurrCoordTransform(matrix, transformVar, fsVar);
+        handler->specifyCoordsForCurrCoordTransform(transformVar, fsVar);
     }
 }
 
@@ -151,13 +146,13 @@
                 uniformHandler->writeUniformMappings(tr.fFP->sampleMatrix().fOwner, vb);
                 if (tr.fType == kFloat2_GrSLType) {
                     vb->codeAppendf("%s = (%s * %s * %s).xy", tr.fName,
-                                    tr.fFP->sampleMatrix().fExpression.c_str(), tr.fMatrix,
+                                    tr.fFP->sampleMatrix().fExpression.c_str(), tr.fMatrix.c_str(),
                                     tr.fLocalCoords.c_str());
                 } else {
                     SkASSERT(tr.fType == kFloat3_GrSLType);
                     vb->codeAppendf("%s = %s * %s * %s", tr.fName,
-                                    tr.fFP->sampleMatrix().fExpression.c_str(), tr.fMatrix,
-                                    tr.fName);
+                                    tr.fFP->sampleMatrix().fExpression.c_str(), tr.fMatrix.c_str(),
+                                    tr.fLocalCoords.c_str());
                 }
                 vb->codeAppend(";\n");
                 vb->codeAppend("}\n");