Rename EmitArgs::fSamplers to fTexSamplers

Renames fSamplers to fTexSamplers in GrProcessor EmitArgs, and renames
GrGLSLTextureSampler to GrGLSLSampler. This will allow us to add a
second array of buffer samplers.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1862373003

Review URL: https://codereview.chromium.org/1862373003
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.cpp b/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
index ac3d734..c3e57bc 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
@@ -81,12 +81,12 @@
         firstSamplerAt += args.fFp.childProcessor(i).numTextures();
     }
     GrGLSLTransformedCoordsArray childCoords;
-    TextureSamplerArray childSamplers;
+    SamplerArray childTexSamplers;
     if (childProc.numTransforms() > 0) {
         childCoords.push_back_n(childProc.numTransforms(), &args.fCoords[firstCoordAt]);
     }
     if (childProc.numTextures() > 0) {
-        childSamplers.push_back_n(childProc.numTextures(), &args.fSamplers[firstSamplerAt]);
+        childTexSamplers.push_back_n(childProc.numTextures(), &args.fTexSamplers[firstSamplerAt]);
     }
 
     // emit the code for the child in its own scope
@@ -100,7 +100,7 @@
                        outputColor,
                        inputColor,
                        childCoords,
-                       childSamplers);
+                       childTexSamplers);
     this->childProcessor(childIndex)->emitCode(childArgs);
     fragBuilder->codeAppend("}\n");
 
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.h b/src/gpu/glsl/GrGLSLFragmentProcessor.h
index ae2d69d..5c71340 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.h
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.h
@@ -8,9 +8,10 @@
 #ifndef GrGLSLFragmentProcessor_DEFINED
 #define GrGLSLFragmentProcessor_DEFINED
 
+#include "GrFragmentProcessor.h"
 #include "glsl/GrGLSLProcessorTypes.h"
 #include "glsl/GrGLSLProgramDataManager.h"
-#include "glsl/GrGLSLTextureSampler.h"
+#include "glsl/GrGLSLSampler.h"
 
 class GrProcessor;
 class GrProcessorKeyBuilder;
@@ -30,7 +31,7 @@
     }
 
     typedef GrGLSLProgramDataManager::UniformHandle UniformHandle;
-    typedef GrGLSLTextureSampler::TextureSamplerArray TextureSamplerArray;
+    typedef GrGLSLSampler::SamplerArray SamplerArray;
 
     /** Called when the program stage should insert its code into the shaders. The code in each
         shader will be in its own block ({}) and so locally scoped names will not collide across
@@ -59,7 +60,7 @@
                  const char* outputColor,
                  const char* inputColor,
                  const GrGLSLTransformedCoordsArray& coords,
-                 const TextureSamplerArray& samplers)
+                 const SamplerArray& texSamplers)
             : fFragBuilder(fragBuilder)
             , fUniformHandler(uniformHandler)
             , fGLSLCaps(caps)
@@ -67,7 +68,7 @@
             , fOutputColor(outputColor)
             , fInputColor(inputColor)
             , fCoords(coords)
-            , fSamplers(samplers) {}
+            , fTexSamplers(texSamplers) {}
         GrGLSLFPFragmentBuilder* fFragBuilder;
         GrGLSLUniformHandler* fUniformHandler;
         const GrGLSLCaps* fGLSLCaps;
@@ -75,7 +76,7 @@
         const char* fOutputColor;
         const char* fInputColor;
         const GrGLSLTransformedCoordsArray& fCoords;
-        const TextureSamplerArray& fSamplers;
+        const SamplerArray& fTexSamplers;
     };
 
     virtual void emitCode(EmitArgs&) = 0;
diff --git a/src/gpu/glsl/GrGLSLPrimitiveProcessor.h b/src/gpu/glsl/GrGLSLPrimitiveProcessor.h
index ccfbc3e..fc0c478 100644
--- a/src/gpu/glsl/GrGLSLPrimitiveProcessor.h
+++ b/src/gpu/glsl/GrGLSLPrimitiveProcessor.h
@@ -11,7 +11,7 @@
 #include "GrPrimitiveProcessor.h"
 #include "glsl/GrGLSLProcessorTypes.h"
 #include "glsl/GrGLSLProgramDataManager.h"
-#include "glsl/GrGLSLTextureSampler.h"
+#include "glsl/GrGLSLSampler.h"
 
 class GrBatchTracker;
 class GrPrimitiveProcessor;
@@ -27,7 +27,7 @@
     virtual ~GrGLSLPrimitiveProcessor() {}
 
     typedef GrGLSLProgramDataManager::UniformHandle UniformHandle;
-    typedef GrGLSLTextureSampler::TextureSamplerArray TextureSamplerArray;
+    typedef GrGLSLSampler::SamplerArray SamplerArray;
 
     typedef SkSTArray<2, const GrCoordTransform*, true> ProcCoords;
     typedef SkSTArray<8, ProcCoords> TransformsIn;
@@ -42,7 +42,7 @@
                  const GrPrimitiveProcessor& gp,
                  const char* outputColor,
                  const char* outputCoverage,
-                 const TextureSamplerArray& samplers,
+                 const SamplerArray& texSamplers,
                  const TransformsIn& transformsIn,
                  TransformsOut* transformsOut)
             : fVertBuilder(vertBuilder)
@@ -53,7 +53,7 @@
             , fGP(gp)
             , fOutputColor(outputColor)
             , fOutputCoverage(outputCoverage)
-            , fSamplers(samplers)
+            , fTexSamplers(texSamplers)
             , fTransformsIn(transformsIn)
             , fTransformsOut(transformsOut) {}
         GrGLSLVertexBuilder* fVertBuilder;
@@ -64,7 +64,7 @@
         const GrPrimitiveProcessor& fGP;
         const char* fOutputColor;
         const char* fOutputCoverage;
-        const TextureSamplerArray& fSamplers;
+        const SamplerArray& fTexSamplers;
         const TransformsIn& fTransformsIn;
         TransformsOut* fTransformsOut;
     };
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index 4e90452..ccb078b 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -97,8 +97,8 @@
     SkASSERT(!fGeometryProcessor);
     fGeometryProcessor = proc.createGLSLInstance(*this->glslCaps());
 
-    SkSTArray<4, GrGLSLTextureSampler> samplers(proc.numTextures());
-    this->emitSamplers(proc, &samplers);
+    SkSTArray<4, GrGLSLSampler> texSamplers(proc.numTextures());
+    this->emitSamplers(proc, &texSamplers);
 
     GrGLSLGeometryProcessor::EmitArgs args(&fVS,
                                            &fFS,
@@ -108,7 +108,7 @@
                                            proc,
                                            outputColor->c_str(),
                                            outputCoverage->c_str(),
-                                           samplers,
+                                           texSamplers,
                                            fCoordTransforms,
                                            &fOutCoords);
     fGeometryProcessor->emitCode(args);
@@ -148,8 +148,8 @@
 
     GrGLSLFragmentProcessor* fragProc = fp.createGLSLInstance();
 
-    SkSTArray<4, GrGLSLTextureSampler> samplers(fp.numTextures());
-    this->emitSamplers(fp, &samplers);
+    SkSTArray<4, GrGLSLSampler> texSamplers(fp.numTextures());
+    this->emitSamplers(fp, &texSamplers);
 
     GrGLSLFragmentProcessor::EmitArgs args(&fFS,
                                            this->uniformHandler(),
@@ -158,7 +158,7 @@
                                            output->c_str(),
                                            input.isOnes() ? nullptr : input.c_str(),
                                            fOutCoords[index],
-                                           samplers);
+                                           texSamplers);
     fragProc->emitCode(args);
 
     // We have to check that effects and the code they emit are consistent, ie if an effect
@@ -193,8 +193,8 @@
     openBrace.printf("{ // Xfer Processor: %s\n", xp.name());
     fFS.codeAppend(openBrace.c_str());
 
-    SkSTArray<4, GrGLSLTextureSampler> samplers(xp.numTextures());
-    this->emitSamplers(xp, &samplers);
+    SkSTArray<4, GrGLSLSampler> texSamplers(xp.numTextures());
+    this->emitSamplers(xp, &texSamplers);
 
     bool usePLSDstRead = (plsState == GrPixelLocalStorageState::kFinish_GrPixelLocalStorageState);
     GrGLSLXferProcessor::EmitArgs args(&fFS,
@@ -204,7 +204,7 @@
                                        ignoresCoverage ? nullptr : coverageIn.c_str(),
                                        fFS.getPrimaryColorOutputName(),
                                        fFS.getSecondaryColorOutputName(),
-                                       samplers,
+                                       texSamplers,
                                        usePLSDstRead);
     fXferProcessor->emitCode(args);
 
@@ -215,7 +215,7 @@
 }
 
 void GrGLSLProgramBuilder::emitSamplers(const GrProcessor& processor,
-                                        GrGLSLTextureSampler::TextureSamplerArray* outSamplers) {
+                                        GrGLSLSampler::SamplerArray* outTexSamplers) {
     int numTextures = processor.numTextures();
     UniformHandle* localSamplerUniforms = fSamplerUniforms.push_back_n(numTextures);
     SkString name;
@@ -248,7 +248,7 @@
                                                                      samplerType,
                                                                      precision,
                                                                      name.c_str());
-        outSamplers->emplace_back(localSamplerUniforms[t], access);
+        outTexSamplers->emplace_back(localSamplerUniforms[t], access.getTexture()->config());
     }
 }
 
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h
index 952db7e..4d253c7 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.h
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.h
@@ -15,7 +15,7 @@
 #include "glsl/GrGLSLPrimitiveProcessor.h"
 #include "glsl/GrGLSLProgramDataManager.h"
 #include "glsl/GrGLSLUniformHandler.h"
-#include "glsl/GrGLSLTextureSampler.h"
+#include "glsl/GrGLSLSampler.h"
 #include "glsl/GrGLSLVertexShaderBuilder.h"
 #include "glsl/GrGLSLXferProcessor.h"
 
@@ -146,8 +146,7 @@
                                 const GrGLSLExpr4& coverageIn,
                                 bool ignoresCoverage,
                                 GrPixelLocalStorageState plsState);
-    void emitSamplers(const GrProcessor& processor,
-                      GrGLSLTextureSampler::TextureSamplerArray* outSamplers);
+    void emitSamplers(const GrProcessor& processor, GrGLSLSampler::SamplerArray* outTexSamplers);
     void emitFSOutputSwizzle(bool hasSecondaryOutput);
     bool checkSamplerCounts();
 
diff --git a/src/gpu/glsl/GrGLSLSampler.h b/src/gpu/glsl/GrGLSLSampler.h
new file mode 100644
index 0000000..0fc67a9
--- /dev/null
+++ b/src/gpu/glsl/GrGLSLSampler.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrGLSLSampler_DEFINED
+#define GrGLSLSampler_DEFINED
+
+#include "GrTypes.h"
+#include "SkTArray.h"
+#include "glsl/GrGLSLProgramDataManager.h"
+
+class GrGLSLSampler {
+public:
+    typedef GrGLSLProgramDataManager::UniformHandle UniformHandle;
+    typedef SkTArray<GrGLSLSampler> SamplerArray;
+
+    GrGLSLSampler(UniformHandle uniform, GrPixelConfig config)
+        : fSamplerUniform(uniform)
+        , fConfig(config) {
+        SkASSERT(kUnknown_GrPixelConfig != fConfig);
+    }
+
+    GrPixelConfig config() const { return fConfig; }
+
+private:
+    UniformHandle fSamplerUniform;
+    GrPixelConfig fConfig;
+
+    friend class GrGLSLShaderBuilder;
+};
+
+#endif
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
index 795e5cb..91a0f9b 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
@@ -9,7 +9,7 @@
 #include "glsl/GrGLSLShaderBuilder.h"
 #include "glsl/GrGLSLCaps.h"
 #include "glsl/GrGLSLShaderVar.h"
-#include "glsl/GrGLSLTextureSampler.h"
+#include "glsl/GrGLSLSampler.h"
 #include "glsl/GrGLSLProgramBuilder.h"
 
 GrGLSLShaderBuilder::GrGLSLShaderBuilder(GrGLSLProgramBuilder* program)
@@ -63,7 +63,7 @@
 }
 
 void GrGLSLShaderBuilder::appendTextureLookup(SkString* out,
-                                              const GrGLSLTextureSampler& sampler,
+                                              const GrGLSLSampler& sampler,
                                               const char* coordName,
                                               GrSLType varyingType) const {
     const GrGLSLCaps* glslCaps = fProgramBuilder->glslCaps();
@@ -103,14 +103,14 @@
     }
 }
 
-void GrGLSLShaderBuilder::appendTextureLookup(const GrGLSLTextureSampler& sampler,
+void GrGLSLShaderBuilder::appendTextureLookup(const GrGLSLSampler& sampler,
                                               const char* coordName,
                                               GrSLType varyingType) {
     this->appendTextureLookup(&this->code(), sampler, coordName, varyingType);
 }
 
 void GrGLSLShaderBuilder::appendTextureLookupAndModulate(const char* modulation,
-                                                         const GrGLSLTextureSampler& sampler,
+                                                         const GrGLSLSampler& sampler,
                                                          const char* coordName,
                                                          GrSLType varyingType) {
     SkString lookup;
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.h b/src/gpu/glsl/GrGLSLShaderBuilder.h
index cddf7b2..6f8bf68 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.h
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.h
@@ -15,7 +15,7 @@
 #include <stdarg.h>
 
 class GrGLSLProgramBuilder;
-class GrGLSLTextureSampler;
+class GrGLSLSampler;
 
 /**
   base class for all shaders builders
@@ -27,25 +27,25 @@
 
     /** Appends a 2D texture sample with projection if necessary. coordType must either be Vec2f or
         Vec3f. The latter is interpreted as projective texture coords. The vec length and swizzle
-        order of the result depends on the GrTextureAccess associated with the GrGLSLTextureSampler.
+        order of the result depends on the GrTextureAccess associated with the GrGLSLSampler.
         */
     void appendTextureLookup(SkString* out,
-                             const GrGLSLTextureSampler&,
+                             const GrGLSLSampler&,
                              const char* coordName,
                              GrSLType coordType = kVec2f_GrSLType) const;
 
     /** Version of above that appends the result to the fragment shader code instead.*/
-    void appendTextureLookup(const GrGLSLTextureSampler&,
+    void appendTextureLookup(const GrGLSLSampler&,
                              const char* coordName,
                              GrSLType coordType = kVec2f_GrSLType);
 
 
     /** Does the work of appendTextureLookup and modulates the result by modulation. The result is
-        always a vec4. modulation and the swizzle specified by GrGLSLTextureSampler must both be
+        always a vec4. modulation and the swizzle specified by GrGLSLSampler must both be
         vec4 or float. If modulation is "" or nullptr it this function acts as though
         appendTextureLookup were called. */
     void appendTextureLookupAndModulate(const char* modulation,
-                                        const GrGLSLTextureSampler&,
+                                        const GrGLSLSampler&,
                                         const char* coordName,
                                         GrSLType coordType = kVec2f_GrSLType);
 
diff --git a/src/gpu/glsl/GrGLSLTextureSampler.h b/src/gpu/glsl/GrGLSLTextureSampler.h
deleted file mode 100644
index fd8bcb2..0000000
--- a/src/gpu/glsl/GrGLSLTextureSampler.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef GrGLSLTextureSampler_DEFINED
-#define GrGLSLTextureSampler_DEFINED
-
-#include "GrShaderVar.h"
-#include "GrTextureAccess.h"
-#include "glsl/GrGLSLProgramDataManager.h"
-
-class GrGLSLTextureSampler {
-public:
-    typedef GrGLSLProgramDataManager::UniformHandle UniformHandle;
-    typedef SkTArray<GrGLSLTextureSampler> TextureSamplerArray;
-
-    GrGLSLTextureSampler(UniformHandle uniform, const GrTextureAccess& access)
-        : fSamplerUniform(uniform)
-        , fConfig(access.getTexture()->config()) {
-        SkASSERT(kUnknown_GrPixelConfig != fConfig);
-    }
-
-    GrPixelConfig config() const { return fConfig; }
-
-private:
-    UniformHandle fSamplerUniform;
-    GrPixelConfig fConfig;
-
-    friend class GrGLSLShaderBuilder;
-};
-
-#endif
diff --git a/src/gpu/glsl/GrGLSLXferProcessor.cpp b/src/gpu/glsl/GrGLSLXferProcessor.cpp
index c4b62be..f0f5efd 100644
--- a/src/gpu/glsl/GrGLSLXferProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLXferProcessor.cpp
@@ -57,7 +57,7 @@
         }
 
         fragBuilder->codeAppendf("vec4 %s = ", dstColor);
-        fragBuilder->appendTextureLookup(args.fSamplers[0], "_dstTexCoord", kVec2f_GrSLType);
+        fragBuilder->appendTextureLookup(args.fTexSamplers[0], "_dstTexCoord", kVec2f_GrSLType);
         fragBuilder->codeAppend(";");
     }
 
diff --git a/src/gpu/glsl/GrGLSLXferProcessor.h b/src/gpu/glsl/GrGLSLXferProcessor.h
index 478956d..3f190ce 100644
--- a/src/gpu/glsl/GrGLSLXferProcessor.h
+++ b/src/gpu/glsl/GrGLSLXferProcessor.h
@@ -9,7 +9,7 @@
 #define GrGLSLXferProcessor_DEFINED
 
 #include "glsl/GrGLSLProgramDataManager.h"
-#include "glsl/GrGLSLTextureSampler.h"
+#include "glsl/GrGLSLSampler.h"
 
 class GrXferProcessor;
 class GrGLSLCaps;
@@ -22,7 +22,7 @@
     GrGLSLXferProcessor() {}
     virtual ~GrGLSLXferProcessor() {}
 
-    typedef GrGLSLTextureSampler::TextureSamplerArray TextureSamplerArray;
+    typedef GrGLSLSampler::SamplerArray SamplerArray;
     struct EmitArgs {
         EmitArgs(GrGLSLXPFragmentBuilder* fragBuilder,
                  GrGLSLUniformHandler* uniformHandler,
@@ -32,7 +32,7 @@
                  const char* inputCoverage,
                  const char* outputPrimary,
                  const char* outputSecondary,
-                 const TextureSamplerArray& samplers,
+                 const SamplerArray& texSamplers,
                  const bool usePLSDstRead)
             : fXPFragBuilder(fragBuilder)
             , fUniformHandler(uniformHandler)
@@ -42,7 +42,7 @@
             , fInputCoverage(inputCoverage)
             , fOutputPrimary(outputPrimary)
             , fOutputSecondary(outputSecondary)
-            , fSamplers(samplers)
+            , fTexSamplers(texSamplers)
             , fUsePLSDstRead(usePLSDstRead) {}
 
         GrGLSLXPFragmentBuilder* fXPFragBuilder;
@@ -53,7 +53,7 @@
         const char* fInputCoverage;
         const char* fOutputPrimary;
         const char* fOutputSecondary;
-        const TextureSamplerArray& fSamplers;
+        const SamplerArray& fTexSamplers;
         bool fUsePLSDstRead;
     };
     /**