Moved SampleMatrix computation out of SectionAndParameterHelper

This will let us share this code with the pipeline stage code generator,
which doesn't use the helper.

Change-Id: I8df3a71d448697d98b1fcbabda524e48e42db591
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295561
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/sksl/SkSLHCodeGenerator.cpp b/src/sksl/SkSLHCodeGenerator.cpp
index c4a7748..f53b572 100644
--- a/src/sksl/SkSLHCodeGenerator.cpp
+++ b/src/sksl/SkSLHCodeGenerator.cpp
@@ -8,6 +8,7 @@
 #include "src/sksl/SkSLHCodeGenerator.h"
 
 #include "src/sksl/SkSLParser.h"
+#include "src/sksl/SkSLSampleMatrix.h"
 #include "src/sksl/SkSLUtil.h"
 #include "src/sksl/ir/SkSLEnum.h"
 #include "src/sksl/ir/SkSLFunctionDeclaration.h"
@@ -285,7 +286,7 @@
                 this->writef("            %s->setSampledWithExplicitCoords();",
                              String(param->fName).c_str());
             }
-            SampleMatrix matrix = fSectionAndParameterHelper.getMatrix(*param);
+            SampleMatrix matrix = SampleMatrix::Make(fProgram, *param);
             switch (matrix.fKind) {
                 case SampleMatrix::Kind::kVariable:
                     this->writef("            %s->setSampleMatrix(SkSL::SampleMatrix("