From 0bbecb21ab82b3d742c491780bcc2e74be03efed Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 17 Nov 2016 11:38:22 -0500 Subject: 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 Reviewed-by: Greg Daniel --- src/effects/GrAlphaThresholdFragmentProcessor.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/effects/GrAlphaThresholdFragmentProcessor.cpp') diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.cpp b/src/effects/GrAlphaThresholdFragmentProcessor.cpp index 442acd0129..9a131f8d47 100644 --- a/src/effects/GrAlphaThresholdFragmentProcessor.cpp +++ b/src/effects/GrAlphaThresholdFragmentProcessor.cpp @@ -10,7 +10,6 @@ #if SK_SUPPORT_GPU #include "GrInvariantOutput.h" -#include "GrTextureAccess.h" #include "SkRefCnt.h" #include "glsl/GrGLSLColorSpaceXformHelper.h" @@ -49,17 +48,17 @@ GrAlphaThresholdFragmentProcessor::GrAlphaThresholdFragmentProcessor( , fOuterThreshold(outerThreshold) , fImageCoordTransform(GrCoordTransform::MakeDivByTextureWHMatrix(texture), texture, GrTextureParams::kNone_FilterMode) - , fImageTextureAccess(texture) + , fImageTextureSampler(texture) , fColorSpaceXform(std::move(colorSpaceXform)) , fMaskCoordTransform(make_div_and_translate_matrix(maskTexture, -bounds.x(), -bounds.y()), maskTexture, GrTextureParams::kNone_FilterMode) - , fMaskTextureAccess(maskTexture) { + , fMaskTextureSampler(maskTexture) { this->initClassID(); this->addCoordTransform(&fImageCoordTransform); - this->addTextureAccess(&fImageTextureAccess); + this->addTextureSampler(&fImageTextureSampler); this->addCoordTransform(&fMaskCoordTransform); - this->addTextureAccess(&fMaskTextureAccess); + this->addTextureSampler(&fMaskTextureSampler); } bool GrAlphaThresholdFragmentProcessor::onIsEqual(const GrFragmentProcessor& sBase) const { @@ -69,9 +68,10 @@ bool GrAlphaThresholdFragmentProcessor::onIsEqual(const GrFragmentProcessor& sBa } void GrAlphaThresholdFragmentProcessor::onComputeInvariantOutput(GrInvariantOutput* inout) const { - if (GrPixelConfigIsAlphaOnly(this->texture(0)->config())) { + GrPixelConfig config = this->textureSampler(0).getTexture()->config(); + if (GrPixelConfigIsAlphaOnly(config)) { inout->mulByUnknownSingleComponent(); - } else if (GrPixelConfigIsOpaque(this->texture(0)->config()) && fOuterThreshold >= 1.f) { + } else if (GrPixelConfigIsOpaque(config) && fOuterThreshold >= 1.f) { inout->mulByUnknownOpaqueFourComponents(); } else { inout->mulByUnknownFourComponents(); -- cgit v1.2.3