Rename vars and functions from 'glslcaps'->'shadercaps'

Change-Id: I34d226d866dd4ba8e5f33f95cb8cbf01292f9314
Reviewed-on: https://skia-review.googlesource.com/5312
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/glsl/GrGLSL.cpp b/src/gpu/glsl/GrGLSL.cpp
index 2f69a3c..d54ddee 100644
--- a/src/gpu/glsl/GrGLSL.cpp
+++ b/src/gpu/glsl/GrGLSL.cpp
@@ -27,9 +27,9 @@
 }
 
 void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision p,
-                                                  const GrShaderCaps& glslCaps,
+                                                  const GrShaderCaps& shaderCaps,
                                                   SkString* out) {
-    if (glslCaps.usesPrecisionModifiers()) {
+    if (shaderCaps.usesPrecisionModifiers()) {
         switch (p) {
             case kHigh_GrSLPrecision:
                 out->append("precision highp float;\n");
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.cpp b/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
index 8c32482..a779acc 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
@@ -52,7 +52,7 @@
     ImageStorages imageStorages = args.fImageStorages.childInputs(childIndex);
     EmitArgs childArgs(fragBuilder,
                        args.fUniformHandler,
-                       args.fGLSLCaps,
+                       args.fShaderCaps,
                        childProc,
                        outputColor,
                        inputColor,
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.h b/src/gpu/glsl/GrGLSLFragmentProcessor.h
index c9230e4..7a8d51c 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.h
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.h
@@ -122,7 +122,7 @@
                  bool gpImplementsDistanceVector)
             : fFragBuilder(fragBuilder)
             , fUniformHandler(uniformHandler)
-            , fGLSLCaps(caps)
+            , fShaderCaps(caps)
             , fFp(fp)
             , fOutputColor(outputColor)
             , fInputColor(inputColor)
@@ -133,7 +133,7 @@
             , fGpImplementsDistanceVector(gpImplementsDistanceVector) {}
         GrGLSLFPFragmentBuilder* fFragBuilder;
         GrGLSLUniformHandler* fUniformHandler;
-        const GrShaderCaps* fGLSLCaps;
+        const GrShaderCaps* fShaderCaps;
         const GrFragmentProcessor& fFp;
         const char* fOutputColor;
         const char* fInputColor;
diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
index 3d9802a..8355f1d 100644
--- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
@@ -94,20 +94,20 @@
 }
 
 bool GrGLSLFragmentShaderBuilder::enableFeature(GLSLFeature feature) {
-    const GrShaderCaps& glslCaps = *fProgramBuilder->shaderCaps();
+    const GrShaderCaps& shaderCaps = *fProgramBuilder->shaderCaps();
     switch (feature) {
         case kPixelLocalStorage_GLSLFeature:
-            if (glslCaps.pixelLocalStorageSize() <= 0) {
+            if (shaderCaps.pixelLocalStorageSize() <= 0) {
                 return false;
             }
             this->addFeature(1 << kPixelLocalStorage_GLSLFeature,
                              "GL_EXT_shader_pixel_local_storage");
             return true;
         case kMultisampleInterpolation_GLSLFeature:
-            if (!glslCaps.multisampleInterpolationSupport()) {
+            if (!shaderCaps.multisampleInterpolationSupport()) {
                 return false;
             }
-            if (const char* extension = glslCaps.multisampleInterpolationExtensionString()) {
+            if (const char* extension = shaderCaps.multisampleInterpolationExtensionString()) {
                 this->addFeature(1 << kMultisampleInterpolation_GLSLFeature, extension);
             }
             return true;
@@ -133,16 +133,16 @@
 const char* GrGLSLFragmentShaderBuilder::fragmentPosition() {
     SkDEBUGCODE(fUsedProcessorFeatures |= GrProcessor::kFragmentPosition_RequiredFeature;)
 
-    const GrShaderCaps* glslCaps = fProgramBuilder->shaderCaps();
+    const GrShaderCaps* shaderCaps = fProgramBuilder->shaderCaps();
     // We only declare "gl_FragCoord" when we're in the case where we want to use layout qualifiers
     // to reverse y. Otherwise it isn't necessary and whether the "in" qualifier appears in the
     // declaration varies in earlier GLSL specs. So it is simpler to omit it.
     if (kTopLeft_GrSurfaceOrigin == this->getSurfaceOrigin()) {
         fSetupFragPosition = true;
         return "gl_FragCoord";
-    } else if (const char* extension = glslCaps->fragCoordConventionsExtensionString()) {
+    } else if (const char* extension = shaderCaps->fragCoordConventionsExtensionString()) {
         if (!fSetupFragPosition) {
-            if (glslCaps->generation() < k150_GrGLSLGeneration) {
+            if (shaderCaps->generation() < k150_GrGLSLGeneration) {
                 this->addFeature(1 << kFragCoordConventions_GLSLPrivateFeature,
                                  extension);
             }
@@ -193,12 +193,12 @@
 }
 
 void GrGLSLFragmentShaderBuilder::maskSampleCoverage(const char* mask, bool invert) {
-    const GrShaderCaps& glslCaps = *fProgramBuilder->shaderCaps();
-    if (!glslCaps.sampleVariablesSupport()) {
+    const GrShaderCaps& shaderCaps = *fProgramBuilder->shaderCaps();
+    if (!shaderCaps.sampleVariablesSupport()) {
         SkDEBUGFAIL("Attempted to mask sample coverage without support.");
         return;
     }
-    if (const char* extension = glslCaps.sampleVariablesExtensionString()) {
+    if (const char* extension = shaderCaps.sampleVariablesExtensionString()) {
         this->addFeature(1 << kSampleVariables_GLSLPrivateFeature, extension);
     }
     if (!fHasInitializedSampleMask) {
@@ -213,13 +213,13 @@
 }
 
 void GrGLSLFragmentShaderBuilder::overrideSampleCoverage(const char* mask) {
-    const GrShaderCaps& glslCaps = *fProgramBuilder->shaderCaps();
-    if (!glslCaps.sampleMaskOverrideCoverageSupport()) {
+    const GrShaderCaps& shaderCaps = *fProgramBuilder->shaderCaps();
+    if (!shaderCaps.sampleMaskOverrideCoverageSupport()) {
         SkDEBUGFAIL("Attempted to override sample coverage without support.");
         return;
     }
-    SkASSERT(glslCaps.sampleVariablesSupport());
-    if (const char* extension = glslCaps.sampleVariablesExtensionString()) {
+    SkASSERT(shaderCaps.sampleVariablesSupport());
+    if (const char* extension = shaderCaps.sampleVariablesExtensionString()) {
         this->addFeature(1 << kSampleVariables_GLSLPrivateFeature, extension);
     }
     if (this->addFeature(1 << kSampleMaskOverrideCoverage_GLSLPrivateFeature,
@@ -240,14 +240,14 @@
         return override;
     }
 
-    const GrShaderCaps* glslCaps = fProgramBuilder->shaderCaps();
-    if (glslCaps->fbFetchSupport()) {
+    const GrShaderCaps* shaderCaps = fProgramBuilder->shaderCaps();
+    if (shaderCaps->fbFetchSupport()) {
         this->addFeature(1 << kFramebufferFetch_GLSLPrivateFeature,
-                         glslCaps->fbFetchExtensionString());
+                         shaderCaps->fbFetchExtensionString());
 
         // Some versions of this extension string require declaring custom color output on ES 3.0+
-        const char* fbFetchColorName = glslCaps->fbFetchColorName();
-        if (glslCaps->fbFetchNeedsCustomOutput()) {
+        const char* fbFetchColorName = shaderCaps->fbFetchColorName();
+        if (shaderCaps->fbFetchNeedsCustomOutput()) {
             this->enableCustomOutput();
             fOutputs[fCustomColorOutputIndex].setTypeModifier(GrShaderVar::kInOut_TypeModifier);
             fbFetchColorName = DeclaredColorOutputName();
diff --git a/src/gpu/glsl/GrGLSLPrimitiveProcessor.h b/src/gpu/glsl/GrGLSLPrimitiveProcessor.h
index 6c3d3a8..4aae284 100644
--- a/src/gpu/glsl/GrGLSLPrimitiveProcessor.h
+++ b/src/gpu/glsl/GrGLSLPrimitiveProcessor.h
@@ -85,7 +85,7 @@
             , fFragBuilder(fragBuilder)
             , fVaryingHandler(varyingHandler)
             , fUniformHandler(uniformHandler)
-            , fGLSLCaps(caps)
+            , fShaderCaps(caps)
             , fGP(gp)
             , fOutputColor(outputColor)
             , fOutputCoverage(outputCoverage)
@@ -99,7 +99,7 @@
         GrGLSLPPFragmentBuilder* fFragBuilder;
         GrGLSLVaryingHandler* fVaryingHandler;
         GrGLSLUniformHandler* fUniformHandler;
-        const GrShaderCaps* fGLSLCaps;
+        const GrShaderCaps* fShaderCaps;
         const GrPrimitiveProcessor& fGP;
         const char* fOutputColor;
         const char* fOutputCoverage;
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index 40e5a43..590439d 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -364,22 +364,22 @@
 }
 
 bool GrGLSLProgramBuilder::checkSamplerCounts() {
-    const GrShaderCaps& glslCaps = *this->shaderCaps();
-    if (fNumVertexSamplers > glslCaps.maxVertexSamplers()) {
+    const GrShaderCaps& shaderCaps = *this->shaderCaps();
+    if (fNumVertexSamplers > shaderCaps.maxVertexSamplers()) {
         GrCapsDebugf(this->caps(), "Program would use too many vertex samplers\n");
         return false;
     }
-    if (fNumGeometrySamplers > glslCaps.maxGeometrySamplers()) {
+    if (fNumGeometrySamplers > shaderCaps.maxGeometrySamplers()) {
         GrCapsDebugf(this->caps(), "Program would use too many geometry samplers\n");
         return false;
     }
-    if (fNumFragmentSamplers > glslCaps.maxFragmentSamplers()) {
+    if (fNumFragmentSamplers > shaderCaps.maxFragmentSamplers()) {
         GrCapsDebugf(this->caps(), "Program would use too many fragment samplers\n");
         return false;
     }
     // If the same sampler is used in two different shaders, it counts as two combined samplers.
     int numCombinedSamplers = fNumVertexSamplers + fNumGeometrySamplers + fNumFragmentSamplers;
-    if (numCombinedSamplers > glslCaps.maxCombinedSamplers()) {
+    if (numCombinedSamplers > shaderCaps.maxCombinedSamplers()) {
         GrCapsDebugf(this->caps(), "Program would use too many combined samplers\n");
         return false;
     }
@@ -387,23 +387,23 @@
 }
 
 bool GrGLSLProgramBuilder::checkImageStorageCounts() {
-    const GrShaderCaps& glslCaps = *this->shaderCaps();
-    if (fNumVertexImageStorages > glslCaps.maxVertexImageStorages()) {
+    const GrShaderCaps& shaderCaps = *this->shaderCaps();
+    if (fNumVertexImageStorages > shaderCaps.maxVertexImageStorages()) {
         GrCapsDebugf(this->caps(), "Program would use too many vertex images\n");
         return false;
     }
-    if (fNumGeometryImageStorages > glslCaps.maxGeometryImageStorages()) {
+    if (fNumGeometryImageStorages > shaderCaps.maxGeometryImageStorages()) {
         GrCapsDebugf(this->caps(), "Program would use too many geometry images\n");
         return false;
     }
-    if (fNumFragmentImageStorages > glslCaps.maxFragmentImageStorages()) {
+    if (fNumFragmentImageStorages > shaderCaps.maxFragmentImageStorages()) {
         GrCapsDebugf(this->caps(), "Program would use too many fragment images\n");
         return false;
     }
     // If the same image is used in two different shaders, it counts as two combined images.
     int numCombinedImages = fNumVertexImageStorages + fNumGeometryImageStorages +
         fNumFragmentImageStorages;
-    if (numCombinedImages > glslCaps.maxCombinedImageStorages()) {
+    if (numCombinedImages > shaderCaps.maxCombinedImageStorages()) {
         GrCapsDebugf(this->caps(), "Program would use too many combined images\n");
         return false;
     }
diff --git a/src/gpu/glsl/GrGLSLXferProcessor.cpp b/src/gpu/glsl/GrGLSLXferProcessor.cpp
index 0588513..e269819 100644
--- a/src/gpu/glsl/GrGLSLXferProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLXferProcessor.cpp
@@ -63,7 +63,7 @@
         fragBuilder->appendTextureLookup(args.fTexSamplers[0], "_dstTexCoord", kVec2f_GrSLType);
         fragBuilder->codeAppend(";");
     } else {
-        needsLocalOutColor = args.fGLSLCaps->requiresLocalOutputColorForFBFetch();
+        needsLocalOutColor = args.fShaderCaps->requiresLocalOutputColorForFBFetch();
     }
 
     const char* outColor = "_localColorOut";
diff --git a/src/gpu/glsl/GrGLSLXferProcessor.h b/src/gpu/glsl/GrGLSLXferProcessor.h
index f3a1c68..90c1bce 100644
--- a/src/gpu/glsl/GrGLSLXferProcessor.h
+++ b/src/gpu/glsl/GrGLSLXferProcessor.h
@@ -39,7 +39,7 @@
                  const bool usePLSDstRead)
             : fXPFragBuilder(fragBuilder)
             , fUniformHandler(uniformHandler)
-            , fGLSLCaps(caps)
+            , fShaderCaps(caps)
             , fXP(xp)
             , fInputColor(inputColor)
             , fInputCoverage(inputCoverage)
@@ -52,7 +52,7 @@
 
         GrGLSLXPFragmentBuilder* fXPFragBuilder;
         GrGLSLUniformHandler* fUniformHandler;
-        const GrShaderCaps* fGLSLCaps;
+        const GrShaderCaps* fShaderCaps;
         const GrXferProcessor& fXP;
         const char* fInputColor;
         const char* fInputCoverage;