aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrSimpleTextureEffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/GrSimpleTextureEffect.cpp')
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index 5e3e6979ca..0dda499731 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -54,12 +54,16 @@ GrSimpleTextureEffect::GrSimpleTextureEffect(const GrSimpleTextureEffect& src)
, fImage(src.fImage)
, fMatrix(src.fMatrix)
, fImageCoordTransform(src.fImageCoordTransform) {
- this->addTextureSampler(&fImage);
+ this->setTextureSamplerCnt(1);
this->addCoordTransform(&fImageCoordTransform);
}
std::unique_ptr<GrFragmentProcessor> GrSimpleTextureEffect::clone() const {
return std::unique_ptr<GrFragmentProcessor>(new GrSimpleTextureEffect(*this));
}
+const GrFragmentProcessor::TextureSampler& GrSimpleTextureEffect::onTextureSampler(
+ int index) const {
+ return IthTextureSampler(index, fImage);
+}
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSimpleTextureEffect);
#if GR_TEST_UTILS
std::unique_ptr<GrFragmentProcessor> GrSimpleTextureEffect::TestCreate(