Rename GrTextureAccess to GrProcessor::TextureSampler.
Renames vars and methods that used the work "access" to refer to this type.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4931
Change-Id: Ibcf488fbd445c5119fc13d190544cd98981bdbee
Reviewed-on: https://skia-review.googlesource.com/4931
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index 7f9fd85..a99e2af 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -85,8 +85,8 @@
vertBuilder->codeAppendf("%s = %s;", uv.vsOut(), dfTexEffect.inTextureCoords()->fName);
// compute numbers to be hardcoded to convert texture coordinates from float to int
- SkASSERT(dfTexEffect.numTextures() == 1);
- GrTexture* atlas = dfTexEffect.textureAccess(0).getTexture();
+ SkASSERT(dfTexEffect.numTextureSamplers() == 1);
+ GrTexture* atlas = dfTexEffect.textureSampler(0).getTexture();
SkASSERT(atlas && SkIsPow2(atlas->width()) && SkIsPow2(atlas->height()));
GrGLSLVertToFrag st(kVec2f_GrSLType);
@@ -207,8 +207,8 @@
b->add32(key);
// Currently we hardcode numbers to convert atlas coordinates to normalized floating point
- SkASSERT(gp.numTextures() == 1);
- GrTexture* atlas = gp.textureAccess(0).getTexture();
+ SkASSERT(gp.numTextureSamplers() == 1);
+ GrTexture* atlas = gp.textureSampler(0).getTexture();
SkASSERT(atlas);
b->add32(atlas->width());
b->add32(atlas->height());
@@ -238,7 +238,7 @@
bool usesLocalCoords)
: fColor(color)
, fViewMatrix(viewMatrix)
- , fTextureAccess(texture, params)
+ , fTextureSampler(texture, params)
#ifdef SK_GAMMA_APPLY_TO_A8
, fDistanceAdjust(distanceAdjust)
#endif
@@ -252,7 +252,7 @@
fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType);
fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kVec2us_GrVertexAttribType,
kHigh_GrSLPrecision);
- this->addTextureAccess(&fTextureAccess);
+ this->addTextureSampler(&fTextureSampler);
}
void GrDistanceFieldA8TextGeoProc::getGLSLProcessorKey(const GrGLSLCaps& caps,
@@ -433,7 +433,7 @@
FPCoordTransformIter&& transformIter) override {
SkASSERT(fTextureSizeUni.isValid());
- GrTexture* texture = proc.texture(0);
+ GrTexture* texture = proc.textureSampler(0).getTexture();
if (texture->width() != fTextureSize.width() ||
texture->height() != fTextureSize.height()) {
fTextureSize = SkISize::Make(texture->width(), texture->height());
@@ -484,7 +484,7 @@
bool usesLocalCoords)
: fColor(color)
, fViewMatrix(viewMatrix)
- , fTextureAccess(texture, params)
+ , fTextureSampler(texture, params)
, fFlags(flags & kNonLCD_DistanceFieldEffectMask)
, fInColor(nullptr)
, fUsesLocalCoords(usesLocalCoords) {
@@ -494,7 +494,7 @@
kHigh_GrSLPrecision);
fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType);
fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kVec2f_GrVertexAttribType);
- this->addTextureAccess(&fTextureAccess);
+ this->addTextureSampler(&fTextureSampler);
}
void GrDistanceFieldPathGeoProc::getGLSLProcessorKey(const GrGLSLCaps& caps,
@@ -594,8 +594,8 @@
vertBuilder->codeAppendf("%s = %s;", uv.vsOut(), dfTexEffect.inTextureCoords()->fName);
// compute numbers to be hardcoded to convert texture coordinates from float to int
- SkASSERT(dfTexEffect.numTextures() == 1);
- GrTexture* atlas = dfTexEffect.textureAccess(0).getTexture();
+ SkASSERT(dfTexEffect.numTextureSamplers() == 1);
+ GrTexture* atlas = dfTexEffect.textureSampler(0).getTexture();
SkASSERT(atlas && SkIsPow2(atlas->width()) && SkIsPow2(atlas->height()));
GrGLSLVertToFrag st(kVec2f_GrSLType);
@@ -760,8 +760,8 @@
b->add32(key);
// Currently we hardcode numbers to convert atlas coordinates to normalized floating point
- SkASSERT(gp.numTextures() == 1);
- GrTexture* atlas = gp.textureAccess(0).getTexture();
+ SkASSERT(gp.numTextureSamplers() == 1);
+ GrTexture* atlas = gp.textureSampler(0).getTexture();
SkASSERT(atlas);
b->add32(atlas->width());
b->add32(atlas->height());
@@ -786,7 +786,7 @@
uint32_t flags, bool usesLocalCoords)
: fColor(color)
, fViewMatrix(viewMatrix)
- , fTextureAccess(texture, params)
+ , fTextureSampler(texture, params)
, fDistanceAdjust(distanceAdjust)
, fFlags(flags & kLCD_DistanceFieldEffectMask)
, fUsesLocalCoords(usesLocalCoords) {
@@ -797,7 +797,7 @@
fInColor = &this->addVertexAttrib("inColor", kVec4ub_GrVertexAttribType);
fInTextureCoords = &this->addVertexAttrib("inTextureCoords", kVec2us_GrVertexAttribType,
kHigh_GrSLPrecision);
- this->addTextureAccess(&fTextureAccess);
+ this->addTextureSampler(&fTextureSampler);
}
void GrDistanceFieldLCDTextGeoProc::getGLSLProcessorKey(const GrGLSLCaps& caps,