aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/GrAlphaThresholdFragmentProcessor.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-11-17 11:38:22 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-17 17:18:53 +0000
commit0bbecb21ab82b3d742c491780bcc2e74be03efed (patch)
tree0355eca170a7cb268b27049dd158886d7f62cb87 /src/effects/GrAlphaThresholdFragmentProcessor.cpp
parent9de097639f04e5a18da2d2b123dace9d24ab50e4 (diff)
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>
Diffstat (limited to 'src/effects/GrAlphaThresholdFragmentProcessor.cpp')
-rw-r--r--src/effects/GrAlphaThresholdFragmentProcessor.cpp14
1 files changed, 7 insertions, 7 deletions
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<GrAlphaThresholdFragmentProcessor>();
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();