aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrSingleTextureEffect.h
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/gpu/effects/GrSingleTextureEffect.h
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/gpu/effects/GrSingleTextureEffect.h')
-rw-r--r--src/gpu/effects/GrSingleTextureEffect.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index 12b3a8f791..1d34944c90 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -26,7 +26,7 @@ public:
SkString dumpInfo() const override {
SkString str;
- str.appendf("Texture: %d", fTextureAccess.getTexture()->uniqueID().asUInt());
+ str.appendf("Texture: %d", fTextureSampler.getTexture()->uniqueID().asUInt());
return str;
}
@@ -49,9 +49,10 @@ protected:
* texture.
*/
void updateInvariantOutputForModulation(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())) {
+ } else if (GrPixelConfigIsOpaque(config)) {
inout->mulByUnknownOpaqueFourComponents();
} else {
inout->mulByUnknownFourComponents();
@@ -60,7 +61,7 @@ protected:
private:
GrCoordTransform fCoordTransform;
- GrTextureAccess fTextureAccess;
+ TextureSampler fTextureSampler;
sk_sp<GrColorSpaceXform> fColorSpaceXform;
typedef GrFragmentProcessor INHERITED;