aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrMagnifierEffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/GrMagnifierEffect.cpp')
-rw-r--r--src/gpu/effects/GrMagnifierEffect.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/effects/GrMagnifierEffect.cpp b/src/gpu/effects/GrMagnifierEffect.cpp
index 752a81bd1b..aadd541ce2 100644
--- a/src/gpu/effects/GrMagnifierEffect.cpp
+++ b/src/gpu/effects/GrMagnifierEffect.cpp
@@ -161,12 +161,15 @@ GrMagnifierEffect::GrMagnifierEffect(const GrMagnifierEffect& src)
, fXInvInset(src.fXInvInset)
, fYInvInset(src.fYInvInset)
, fSrcCoordTransform(src.fSrcCoordTransform) {
- this->addTextureSampler(&fSrc);
+ this->setTextureSamplerCnt(1);
this->addCoordTransform(&fSrcCoordTransform);
}
std::unique_ptr<GrFragmentProcessor> GrMagnifierEffect::clone() const {
return std::unique_ptr<GrFragmentProcessor>(new GrMagnifierEffect(*this));
}
+const GrFragmentProcessor::TextureSampler& GrMagnifierEffect::onTextureSampler(int index) const {
+ return IthTextureSampler(index, fSrc);
+}
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMagnifierEffect);
#if GR_TEST_UTILS
std::unique_ptr<GrFragmentProcessor> GrMagnifierEffect::TestCreate(GrProcessorTestData* d) {