In GrProcessor::TextureSampler drop the "get", it's cleaner

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4962

Change-Id: I55e7f8d1b6e1097fdbe411e9989dd42a03dd5f33
Reviewed-on: https://skia-review.googlesource.com/4962
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.cpp b/src/effects/GrAlphaThresholdFragmentProcessor.cpp
index 9a131f8..4e4dbbe 100644
--- a/src/effects/GrAlphaThresholdFragmentProcessor.cpp
+++ b/src/effects/GrAlphaThresholdFragmentProcessor.cpp
@@ -68,7 +68,7 @@
 }
 
 void GrAlphaThresholdFragmentProcessor::onComputeInvariantOutput(GrInvariantOutput* inout) const {
-    GrPixelConfig config = this->textureSampler(0).getTexture()->config();
+    GrPixelConfig config = this->textureSampler(0).texture()->config();
     if (GrPixelConfigIsAlphaOnly(config)) {
         inout->mulByUnknownSingleComponent();
     } else if (GrPixelConfigIsOpaque(config) && fOuterThreshold >= 1.f) {
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp
index 2499155..ad35fda 100644
--- a/src/effects/SkColorCubeFilter.cpp
+++ b/src/effects/SkColorCubeFilter.cpp
@@ -170,7 +170,7 @@
 
     const char* name() const override { return "ColorCube"; }
 
-    int colorCubeSize() const { return fColorCubeSampler.getTexture()->width(); }
+    int colorCubeSize() const { return fColorCubeSampler.texture()->width(); }
 
 
     void onComputeInvariantOutput(GrInvariantOutput*) const override;
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index b1f46cd..e8767ff 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -625,7 +625,7 @@
 void GrGLDisplacementMapEffect::onSetData(const GrGLSLProgramDataManager& pdman,
                                           const GrProcessor& proc) {
     const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMapEffect>();
-    GrTexture* colorTex = displacementMap.textureSampler(1).getTexture();
+    GrTexture* colorTex = displacementMap.textureSampler(1).texture();
     SkScalar scaleX = displacementMap.scale().fX / colorTex->width();
     SkScalar scaleY = displacementMap.scale().fY / colorTex->height();
     pdman.set2f(fScaleUni, SkScalarToFloat(scaleX),
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 154ebc6..b71c7eb 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -1900,7 +1900,7 @@
         fLight = lighting.light()->createGLLight();
     }
 
-    GrTexture* texture = lighting.textureSampler(0).getTexture();
+    GrTexture* texture = lighting.textureSampler(0).texture();
     float ySign = texture->origin() == kTopLeft_GrSurfaceOrigin ? -1.0f : 1.0f;
     pdman.set2f(fImageIncrementUni, 1.0f / texture->width(), ySign / texture->height());
     pdman.set1f(fSurfaceScaleUni, lighting.surfaceScale());
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index ead87d5..d055043 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -294,7 +294,7 @@
 void GrGLMorphologyEffect::onSetData(const GrGLSLProgramDataManager& pdman,
                                      const GrProcessor& proc) {
     const GrMorphologyEffect& m = proc.cast<GrMorphologyEffect>();
-    GrTexture& texture = *m.textureSampler(0).getTexture();
+    GrTexture& texture = *m.textureSampler(0).texture();
 
     float pixelSize = 0.0f;
     switch (m.direction()) {
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index c0170eb..c58e0ee 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -181,7 +181,7 @@
     GrFragmentProcessor::TextureAccessIter iter(proc);
     while (const GrProcessor::TextureSampler* sampler = iter.next()) {
         SkASSERT(rt->getLastOpList());
-        rt->getLastOpList()->addDependency(sampler->getTexture());
+        rt->getLastOpList()->addDependency(sampler->texture());
     }
 }
 
@@ -193,7 +193,7 @@
     const GrXferProcessor& xfer = this->getXferProcessor();
 
     for (int i = 0; i < xfer.numTextureSamplers(); ++i) {
-        GrTexture* texture = xfer.textureSampler(i).getTexture();
+        GrTexture* texture = xfer.textureSampler(i).texture();
         SkASSERT(rt->getLastOpList());
         rt->getLastOpList()->addDependency(texture);
     }
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index f2b4998..77927e4 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -117,7 +117,7 @@
 
 void GrProcessor::addTextureSampler(const TextureSampler* access) {
     fTextureSamplers.push_back(access);
-    this->addGpuResource(access->getProgramTexture());
+    this->addGpuResource(access->programTexture());
 }
 
 void GrProcessor::addBufferAccess(const GrBufferAccess* access) {
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp
index d9afbac..0976af9 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -45,9 +45,9 @@
     int i = 0;
     for (; i < numTextureSamplers; ++i) {
         const GrProcessor::TextureSampler& textureSampler = proc.textureSampler(i);
-        const GrTexture* tex = textureSampler.getTexture();
+        const GrTexture* tex = textureSampler.texture();
         k16[i] = sampler_key(tex->texturePriv().samplerType(), tex->config(),
-                             textureSampler.getVisibility(), caps);
+                             textureSampler.visibility(), caps);
     }
     for (; i < numSamplers; ++i) {
         const GrBufferAccess& access = proc.bufferAccess(i - numTextureSamplers);
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index 17a492f..335ef16 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -126,7 +126,7 @@
 void GrGLBicubicEffect::onSetData(const GrGLSLProgramDataManager& pdman,
                                   const GrProcessor& processor) {
     const GrBicubicEffect& bicubicEffect = processor.cast<GrBicubicEffect>();
-    GrTexture* texture = processor.textureSampler(0).getTexture();
+    GrTexture* texture = processor.textureSampler(0).texture();
     float imageIncrement[2];
     imageIncrement[0] = 1.0f / texture->width();
     imageIncrement[1] = 1.0f / texture->height();
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index 889a085..11c7982 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -31,7 +31,7 @@
 
         // compute numbers to be hardcoded to convert texture coordinates from int to float
         SkASSERT(cte.numTextureSamplers() == 1);
-        SkDEBUGCODE(GrTexture* atlas = cte.textureSampler(0).getTexture());
+        SkDEBUGCODE(GrTexture* atlas = cte.textureSampler(0).texture());
         SkASSERT(atlas && SkIsPow2(atlas->width()) && SkIsPow2(atlas->height()));
 
         GrGLSLVertToFrag v(kVec2f_GrSLType);
@@ -109,7 +109,7 @@
 
         // Currently we hardcode numbers to convert atlas coordinates to normalized floating point
         SkASSERT(gp.numTextureSamplers() == 1);
-        GrTexture* atlas = gp.textureSampler(0).getTexture();
+        GrTexture* atlas = gp.textureSampler(0).texture();
         SkASSERT(atlas);
         b->add32(atlas->width());
         b->add32(atlas->height());
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp
index d8a79d0..05e9deb 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -98,7 +98,7 @@
 void GrGLConvolutionEffect::onSetData(const GrGLSLProgramDataManager& pdman,
                                       const GrProcessor& processor) {
     const GrConvolutionEffect& conv = processor.cast<GrConvolutionEffect>();
-    GrTexture& texture = *conv.textureSampler(0).getTexture();
+    GrTexture& texture = *conv.textureSampler(0).texture();
 
     float imageIncrement[2] = { 0 };
     float ySign = texture.origin() != kTopLeft_GrSurfaceOrigin ? 1.0f : -1.0f;
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index a99e2af..8de6cd2 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -86,7 +86,7 @@
 
         // compute numbers to be hardcoded to convert texture coordinates from float to int
         SkASSERT(dfTexEffect.numTextureSamplers() == 1);
-        GrTexture* atlas = dfTexEffect.textureSampler(0).getTexture();
+        GrTexture* atlas = dfTexEffect.textureSampler(0).texture();
         SkASSERT(atlas && SkIsPow2(atlas->width()) && SkIsPow2(atlas->height()));
 
         GrGLSLVertToFrag st(kVec2f_GrSLType);
@@ -208,7 +208,7 @@
 
         // Currently we hardcode numbers to convert atlas coordinates to normalized floating point
         SkASSERT(gp.numTextureSamplers() == 1);
-        GrTexture* atlas = gp.textureSampler(0).getTexture();
+        GrTexture* atlas = gp.textureSampler(0).texture();
         SkASSERT(atlas);
         b->add32(atlas->width());
         b->add32(atlas->height());
@@ -433,7 +433,7 @@
                  FPCoordTransformIter&& transformIter) override {
         SkASSERT(fTextureSizeUni.isValid());
 
-        GrTexture* texture = proc.textureSampler(0).getTexture();
+        GrTexture* texture = proc.textureSampler(0).texture();
         if (texture->width() != fTextureSize.width() ||
             texture->height() != fTextureSize.height()) {
             fTextureSize = SkISize::Make(texture->width(), texture->height());
@@ -595,7 +595,7 @@
 
         // compute numbers to be hardcoded to convert texture coordinates from float to int
         SkASSERT(dfTexEffect.numTextureSamplers() == 1);
-        GrTexture* atlas = dfTexEffect.textureSampler(0).getTexture();
+        GrTexture* atlas = dfTexEffect.textureSampler(0).texture();
         SkASSERT(atlas && SkIsPow2(atlas->width()) && SkIsPow2(atlas->height()));
 
         GrGLSLVertToFrag st(kVec2f_GrSLType);
@@ -761,7 +761,7 @@
 
         // Currently we hardcode numbers to convert atlas coordinates to normalized floating point
         SkASSERT(gp.numTextureSamplers() == 1);
-        GrTexture* atlas = gp.textureSampler(0).getTexture();
+        GrTexture* atlas = gp.textureSampler(0).texture();
         SkASSERT(atlas);
         b->add32(atlas->width());
         b->add32(atlas->height());
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 8c67882..afc24c9 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -129,7 +129,7 @@
 void GrGLMatrixConvolutionEffect::onSetData(const GrGLSLProgramDataManager& pdman,
                                             const GrProcessor& processor) {
     const GrMatrixConvolutionEffect& conv = processor.cast<GrMatrixConvolutionEffect>();
-    GrTexture* texture = conv.textureSampler(0).getTexture();
+    GrTexture* texture = conv.textureSampler(0).texture();
 
     float imageIncrement[2];
     float ySign = texture->origin() == kTopLeft_GrSurfaceOrigin ? 1.0f : -1.0f;
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index 1d34944..fd1ba98 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -26,7 +26,7 @@
 
     SkString dumpInfo() const override {
         SkString str;
-        str.appendf("Texture: %d", fTextureSampler.getTexture()->uniqueID().asUInt());
+        str.appendf("Texture: %d", fTextureSampler.texture()->uniqueID().asUInt());
         return str;
     }
 
@@ -49,7 +49,7 @@
      * texture.
      */
     void updateInvariantOutputForModulation(GrInvariantOutput* inout) const {
-        GrPixelConfig config = this->textureSampler(0).getTexture()->config();
+        GrPixelConfig config = this->textureSampler(0).texture()->config();
         if (GrPixelConfigIsAlphaOnly(config)) {
             inout->mulByUnknownSingleComponent();
         } else if (GrPixelConfigIsOpaque(config)) {
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 4d163b8..a05a793 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -229,7 +229,7 @@
         void onSetData(const GrGLSLProgramDataManager& pdman, const GrProcessor& fp) override {
             const GrTextureDomainEffect& tde = fp.cast<GrTextureDomainEffect>();
             const GrTextureDomain& domain = tde.fTextureDomain;
-            fGLDomain.setData(pdman, domain, tde.textureSampler(0).getTexture()->origin());
+            fGLDomain.setData(pdman, domain, tde.textureSampler(0).texture()->origin());
         }
 
     private:
@@ -247,7 +247,7 @@
 
 void GrTextureDomainEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
     if (GrTextureDomain::kDecal_Mode == fTextureDomain.mode()) {
-        if (GrPixelConfigIsAlphaOnly(this->textureSampler(0).getTexture()->config())) {
+        if (GrPixelConfigIsAlphaOnly(this->textureSampler(0).texture()->config())) {
             inout->mulByUnknownSingleComponent();
         } else {
             inout->mulByUnknownFourComponents();
@@ -332,7 +332,7 @@
         void onSetData(const GrGLSLProgramDataManager& pdman, const GrProcessor& fp) override {
             const GrDeviceSpaceTextureDecalFragmentProcessor& dstdfp =
                     fp.cast<GrDeviceSpaceTextureDecalFragmentProcessor>();
-            GrTexture* texture = dstdfp.textureSampler(0).getTexture();
+            GrTexture* texture = dstdfp.textureSampler(0).texture();
             fGLDomain.setData(pdman, dstdfp.fTextureDomain, texture->origin());
             float iw = 1.f / texture->width();
             float ih = 1.f / texture->height();
@@ -358,14 +358,14 @@
 bool GrDeviceSpaceTextureDecalFragmentProcessor::onIsEqual(const GrFragmentProcessor& fp) const {
     const GrDeviceSpaceTextureDecalFragmentProcessor& dstdfp =
             fp.cast<GrDeviceSpaceTextureDecalFragmentProcessor>();
-    return dstdfp.fTextureSampler.getTexture() == fTextureSampler.getTexture() &&
+    return dstdfp.fTextureSampler.texture() == fTextureSampler.texture() &&
            dstdfp.fDeviceSpaceOffset == fDeviceSpaceOffset &&
            dstdfp.fTextureDomain == fTextureDomain;
 }
 
 void GrDeviceSpaceTextureDecalFragmentProcessor::onComputeInvariantOutput(
         GrInvariantOutput* inout) const {
-    if (GrPixelConfigIsAlphaOnly(this->textureSampler(0).getTexture()->config())) {
+    if (GrPixelConfigIsAlphaOnly(this->textureSampler(0).texture()->config())) {
         inout->mulByUnknownSingleComponent();
     } else {
         inout->mulByUnknownFourComponents();
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 006077b..50cbdc1 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -154,8 +154,8 @@
                                int* nextSamplerIdx) {
     for (int i = 0; i < processor.numTextureSamplers(); ++i) {
         const GrProcessor::TextureSampler& sampler = processor.textureSampler(i);
-        fGpu->bindTexture((*nextSamplerIdx)++, sampler.getParams(),
-                          allowSRGBInputs, static_cast<GrGLTexture*>(sampler.getTexture()));
+        fGpu->bindTexture((*nextSamplerIdx)++, sampler.params(),
+                          allowSRGBInputs, static_cast<GrGLTexture*>(sampler.texture()));
     }
     for (int i = 0; i < processor.numBuffers(); ++i) {
         const GrBufferAccess& access = processor.bufferAccess(i);
@@ -168,7 +168,7 @@
                                   bool allowSRGBInputs) {
     for (int i = 0; i < processor.numTextureSamplers(); ++i) {
         const GrProcessor::TextureSampler& sampler = processor.textureSampler(i);
-        fGpu->generateMipmaps(sampler.getParams(), allowSRGBInputs,
-                              static_cast<GrGLTexture*>(sampler.getTexture()));
+        fGpu->generateMipmaps(sampler.params(), allowSRGBInputs,
+                              static_cast<GrGLTexture*>(sampler.texture()));
     }
 }
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index fc50fa0..c4c3e68 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -245,18 +245,18 @@
     int numTextureSamplers = processor.numTextureSamplers();
     for (int t = 0; t < numTextureSamplers; ++t) {
         const GrProcessor::TextureSampler& sampler = processor.textureSampler(t);
-        GrSLType samplerType = sampler.getTexture()->texturePriv().samplerType();
+        GrSLType samplerType = sampler.texture()->texturePriv().samplerType();
         if (kTextureExternalSampler_GrSLType == samplerType) {
             const char* externalFeatureString = this->glslCaps()->externalTextureExtensionString();
             // We shouldn't ever create a GrGLTexture that requires external sampler type
             SkASSERT(externalFeatureString);
-            this->addFeature(sampler.getVisibility(),
+            this->addFeature(sampler.visibility(),
                              1 << GrGLSLShaderBuilder::kExternalTexture_GLSLPrivateFeature,
                              externalFeatureString);
         }
         name.printf("TextureSampler_%d", outTexSamplers->count());
-        this->emitSampler(samplerType, sampler.getTexture()->config(),
-                          name.c_str(), sampler.getVisibility(), outTexSamplers);
+        this->emitSampler(samplerType, sampler.texture()->config(),
+                          name.c_str(), sampler.visibility(), outTexSamplers);
     }
 
     if (int numBuffers = processor.numBuffers()) {
diff --git a/src/gpu/text/GrBatchFontCache.h b/src/gpu/text/GrBatchFontCache.h
index d7503b1..552e10f 100644
--- a/src/gpu/text/GrBatchFontCache.h
+++ b/src/gpu/text/GrBatchFontCache.h
@@ -128,7 +128,7 @@
 
     void freeAll();
 
-    // if getTexture returns nullptr, the client must not try to use other functions on the
+    // if texture returns nullptr, the client must not try to use other functions on the
     // GrBatchFontCache which use the atlas.  This function *must* be called first, before other
     // functions which use the atlas.
     GrTexture* getTexture(GrMaskFormat format) {
diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.cpp b/src/gpu/vk/GrVkGpuCommandBuffer.cpp
index 3f0bd39..e94585f 100644
--- a/src/gpu/vk/GrVkGpuCommandBuffer.cpp
+++ b/src/gpu/vk/GrVkGpuCommandBuffer.cpp
@@ -428,7 +428,7 @@
 static void prepare_sampled_images(const GrProcessor& processor, GrVkGpu* gpu) {
     for (int i = 0; i < processor.numTextureSamplers(); ++i) {
         const GrProcessor::TextureSampler& sampler = processor.textureSampler(i);
-        GrVkTexture* vkTexture = static_cast<GrVkTexture*>(sampler.getTexture());
+        GrVkTexture* vkTexture = static_cast<GrVkTexture*>(sampler.texture());
         SkASSERT(vkTexture);
 
         // We may need to resolve the texture first if it is also a render target
@@ -437,7 +437,7 @@
             gpu->onResolveRenderTarget(texRT);
         }
 
-        const GrTextureParams& params = sampler.getParams();
+        const GrTextureParams& params = sampler.params();
         // Check if we need to regenerate any mip maps
         if (GrTextureParams::kMipMap_FilterMode == params.filterMode()) {
             if (vkTexture->texturePriv().mipMapsAreDirty()) {
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp
index 2ca1aaf..48228e0 100644
--- a/src/gpu/vk/GrVkPipelineState.cpp
+++ b/src/gpu/vk/GrVkPipelineState.cpp
@@ -310,9 +310,9 @@
     SkASSERT(fNumSamplers == textureBindings.count());
 
     for (int i = 0; i < textureBindings.count(); ++i) {
-        const GrTextureParams& params = textureBindings[i]->getParams();
+        const GrTextureParams& params = textureBindings[i]->params();
 
-        GrVkTexture* texture = static_cast<GrVkTexture*>(textureBindings[i]->getTexture());
+        GrVkTexture* texture = static_cast<GrVkTexture*>(textureBindings[i]->texture());
 
         fSamplers.push(gpu->resourceProvider().findOrCreateCompatibleSampler(params,
                                                           texture->texturePriv().maxMipMapLevel()));