Revert "Converted texture and runtime effects to use GrMatrixEffect"

This reverts commit 4ab84eda5389bd5c706aacaf52df1ab2f39393ad.

Reason for revert: Breaking some GMs.

Original change's description:
> Converted texture and runtime effects to use GrMatrixEffect
> 
> Change-Id: I6e769d52291dd29c2d06983dae5013b6058864cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283780
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=bsalomon@google.com,brianosman@google.com,ethannicholas@google.com

Change-Id: Idb2c782ae619689744e868bf38111cc4eaf0b40a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284233
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
index be69f25..5cfb986 100644
--- a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
@@ -131,9 +131,14 @@
                 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, localCoordsStr, &fp });
+            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;
+            }
         }
-        handler->specifyCoordsForCurrCoordTransform(transformVar, fsVar);
+        handler->specifyCoordsForCurrCoordTransform(matrix, transformVar, fsVar);
     }
 }
 
@@ -146,12 +151,12 @@
                 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.c_str(),
+                                    tr.fFP->sampleMatrix().fExpression.c_str(), tr.fMatrix,
                                     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.c_str(),
+                                    tr.fFP->sampleMatrix().fExpression.c_str(), tr.fMatrix,
                                     tr.fName);
                 }
                 vb->codeAppend(";\n");