aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrMatrixConvolutionEffect.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-06-15 12:07:18 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-15 17:18:19 +0000
commitfbcef6eb8abad142daf45418516550f7635b4a52 (patch)
tree1fb2b2a1df72ba87ec05a91bd1cd271e24b5544e /src/gpu/effects/GrMatrixConvolutionEffect.cpp
parentbaaf439eb5d08097d794f13800e5bf7ce8885f95 (diff)
Clean up GrResourceProvider usage
The only substantive changes are the removal of GrProxy instantiation in: SkGpuBlurUtils::GaussianBlur GrSimpleTextureEffect::Make* Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc Reviewed-on: https://skia-review.googlesource.com/19965 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/effects/GrMatrixConvolutionEffect.cpp')
-rw-r--r--src/gpu/effects/GrMatrixConvolutionEffect.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index d1726a0122..bc1537c8b4 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -148,8 +148,7 @@ void GrGLMatrixConvolutionEffect::onSetData(const GrGLSLProgramDataManager& pdma
fDomain.setData(pdman, conv.domain(), texture);
}
-GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrResourceProvider* resourceProvider,
- sk_sp<GrTextureProxy> proxy,
+GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(sk_sp<GrTextureProxy> proxy,
const SkIRect& bounds,
const SkISize& kernelSize,
const SkScalar* kernel,
@@ -160,7 +159,7 @@ GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrResourceProvider* resourc
bool convolveAlpha)
// To advertise either the modulation or opaqueness optimizations we'd have to examine the
// parameters.
- : INHERITED(resourceProvider, kNone_OptimizationFlags, proxy, nullptr, SkMatrix::I())
+ : INHERITED(kNone_OptimizationFlags, proxy, nullptr, SkMatrix::I())
, fKernelSize(kernelSize)
, fGain(SkScalarToFloat(gain))
, fBias(SkScalarToFloat(bias) / 255.0f)
@@ -226,7 +225,6 @@ static void fill_in_2D_gaussian_kernel(float* kernel, int width, int height,
// Static function to create a 2D convolution
sk_sp<GrFragmentProcessor> GrMatrixConvolutionEffect::MakeGaussian(
- GrResourceProvider* resourceProvider,
sk_sp<GrTextureProxy> proxy,
const SkIRect& bounds,
const SkISize& kernelSize,
@@ -242,7 +240,7 @@ sk_sp<GrFragmentProcessor> GrMatrixConvolutionEffect::MakeGaussian(
fill_in_2D_gaussian_kernel(kernel, kernelSize.width(), kernelSize.height(), sigmaX, sigmaY);
return sk_sp<GrFragmentProcessor>(
- new GrMatrixConvolutionEffect(resourceProvider, std::move(proxy), bounds, kernelSize,
+ new GrMatrixConvolutionEffect(std::move(proxy), bounds, kernelSize,
kernel, gain, bias, kernelOffset, tileMode, convolveAlpha));
}
@@ -272,8 +270,7 @@ sk_sp<GrFragmentProcessor> GrMatrixConvolutionEffect::TestCreate(GrProcessorTest
GrTextureDomain::Mode tileMode =
static_cast<GrTextureDomain::Mode>(d->fRandom->nextRangeU(0, 2));
bool convolveAlpha = d->fRandom->nextBool();
- return GrMatrixConvolutionEffect::Make(d->resourceProvider(),
- std::move(proxy),
+ return GrMatrixConvolutionEffect::Make(std::move(proxy),
bounds,
kernelSize,
kernel.get(),