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/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
index 48c9053..35de523 100644
--- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
@@ -149,7 +149,7 @@
this->nextStage();
// An FP's function signature is theoretically always main(half4 color, float2 _coords).
- // However, if it is only sampled by a chain of const/uniform matrices (or legacy coord
+ // However, if it is only sampled by a chain of uniform matrix expressions (or legacy coord
// transforms), the value that would have been passed to _coords is lifted to the vertex shader
// and stored in a unique varying. In that case it uses that variable and does not have a
// second actual argument for _coords.
@@ -160,7 +160,7 @@
GrShaderVar(args.fSampleCoord, kFloat2_GrSLType) };
if (!args.fFp.isSampledWithExplicitCoords()) {
- // Sampled with a const/uniform matrix and/or a legacy coord transform. The actual
+ // Sampled with a uniform matrix expression and/or a legacy coord transform. The actual
// transformation code is emitted in the vertex shader, so this only has to access it.
// Add a float2 _coords variable that maps to the associated varying and replaces the
// absent 2nd argument to the fp's function.