aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrMatrixConvolutionEffect.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-07-26 19:07:15 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-26 23:31:30 +0000
commit6cd51b51d6603a3100b147c45f38697f2f199fc6 (patch)
tree55d6bebf39125e0cdb0cd30c4fb6f8489428931a /src/gpu/effects/GrMatrixConvolutionEffect.cpp
parent7f97f49a840c92e26058034c631e8d76a54897bd (diff)
Remove GrSingleTextureEffect
Change-Id: I510cc0657f9433b206dc2ab643fa557667263294 Reviewed-on: https://skia-review.googlesource.com/27180 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/effects/GrMatrixConvolutionEffect.cpp')
-rw-r--r--src/gpu/effects/GrMatrixConvolutionEffect.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index abfe5b3774..cb453fc941 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -158,15 +158,19 @@ GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(sk_sp<GrTextureProxy> proxy
const SkIPoint& kernelOffset,
GrTextureDomain::Mode tileMode,
bool convolveAlpha)
- // To advertise either the modulation or opaqueness optimizations we'd have to examine the
- // parameters.
- : INHERITED(kNone_OptimizationFlags, proxy, nullptr, SkMatrix::I())
- , fKernelSize(kernelSize)
- , fGain(SkScalarToFloat(gain))
- , fBias(SkScalarToFloat(bias) / 255.0f)
- , fConvolveAlpha(convolveAlpha)
- , fDomain(proxy.get(), GrTextureDomain::MakeTexelDomainForMode(bounds, tileMode), tileMode) {
+ // To advertise either the modulation or opaqueness optimizations we'd have to examine the
+ // parameters.
+ : INHERITED(kNone_OptimizationFlags)
+ , fCoordTransform(proxy.get())
+ , fDomain(proxy.get(), GrTextureDomain::MakeTexelDomainForMode(bounds, tileMode), tileMode)
+ , fTextureSampler(std::move(proxy))
+ , fKernelSize(kernelSize)
+ , fGain(SkScalarToFloat(gain))
+ , fBias(SkScalarToFloat(bias) / 255.0f)
+ , fConvolveAlpha(convolveAlpha) {
this->initClassID<GrMatrixConvolutionEffect>();
+ this->addCoordTransform(&fCoordTransform);
+ this->addTextureSampler(&fTextureSampler);
for (int i = 0; i < kernelSize.width() * kernelSize.height(); i++) {
fKernel[i] = SkScalarToFloat(kernel[i]);
}