Change SampleMatrix to SampleUsage

It now tracks all sample calls of a child (matrix, explicit coords,
pass through). There is now just one registerChild() call, and the
sampling pattern of that child is fully determined by the SampleUsage
parameter.

Change-Id: Iaadcd325fca64a59f24192aadd06923c66362181
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299875
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/sksl/SkSLCPPCodeGenerator.cpp b/src/sksl/SkSLCPPCodeGenerator.cpp
index 0a88298..4a0cad9 100644
--- a/src/sksl/SkSLCPPCodeGenerator.cpp
+++ b/src/sksl/SkSLCPPCodeGenerator.cpp
@@ -7,7 +7,7 @@
 
 #include "src/sksl/SkSLCPPCodeGenerator.h"
 
-#include "include/private/SkSLSampleMatrix.h"
+#include "include/private/SkSLSampleUsage.h"
 #include "src/sksl/SkSLAnalysis.h"
 #include "src/sksl/SkSLCPPUniformCTypes.h"
 #include "src/sksl/SkSLCompiler.h"
@@ -438,9 +438,9 @@
         } else if (c.fArguments.back()->fType.name() == "float3x3") {
             // Invoking child with a matrix, sampling relative to the input coords.
             invokeFunction = "invokeChildWithMatrix";
-            SampleMatrix matrix = Analysis::GetSampleMatrix(fProgram, child);
+            SampleUsage usage = Analysis::GetSampleUsage(fProgram, child);
 
-            if (!matrix.isConstUniform()) {
+            if (!usage.hasUniformMatrix()) {
                 inputCoord = "_matrix" + to_string(c.fOffset);
                 addExtraEmitCodeLine(convertSKSLExpressionToCPP(*c.fArguments.back(), inputCoord));
                 inputCoord.append(".c_str()");