diff options
author | Robert Phillips <robertphillips@google.com> | 2017-10-20 15:11:35 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-20 20:29:05 +0000 |
commit | 2b2936e75c79c61ff04082f5ae7a9738c439caac (patch) | |
tree | efdca053dec922b410dd62206310fbfde95d63f9 /src/gpu/effects/GrRectBlurEffect.h | |
parent | f04ff7696d34d810a94b7fd98aa0006955f57fc0 (diff) |
Make GrRectBlurEffect use bilerp
Bug: skia:7031
Change-Id: I8061f516741bf7efd5020984a5b45a9d57307d43
Reviewed-on: https://skia-review.googlesource.com/62461
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/effects/GrRectBlurEffect.h')
-rw-r--r-- | src/gpu/effects/GrRectBlurEffect.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gpu/effects/GrRectBlurEffect.h b/src/gpu/effects/GrRectBlurEffect.h index 7a8bc2c005..688bb3d545 100644 --- a/src/gpu/effects/GrRectBlurEffect.h +++ b/src/gpu/effects/GrRectBlurEffect.h @@ -71,20 +71,22 @@ public: return nullptr; } - return std::unique_ptr<GrFragmentProcessor>( - new GrRectBlurEffect(rect, sigma, std::move(blurProfile))); + return std::unique_ptr<GrFragmentProcessor>(new GrRectBlurEffect( + rect, sigma, std::move(blurProfile), + GrSamplerState(GrSamplerState::WrapMode::kClamp, GrSamplerState::Filter::kBilerp))); } GrRectBlurEffect(const GrRectBlurEffect& src); std::unique_ptr<GrFragmentProcessor> clone() const override; const char* name() const override { return "RectBlurEffect"; } private: - GrRectBlurEffect(SkRect rect, float sigma, sk_sp<GrTextureProxy> blurProfile) + GrRectBlurEffect(SkRect rect, float sigma, sk_sp<GrTextureProxy> blurProfile, + GrSamplerState samplerParams) : INHERITED(kGrRectBlurEffect_ClassID, (OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag) , fRect(rect) , fSigma(sigma) - , fBlurProfile(std::move(blurProfile)) { + , fBlurProfile(std::move(blurProfile), samplerParams) { this->addTextureSampler(&fBlurProfile); } GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |