diff options
author | joshualitt <joshualitt@chromium.org> | 2014-09-23 09:50:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-23 09:50:21 -0700 |
commit | b0a8a377f832c59cee939ad721e1f87d378b7142 (patch) | |
tree | 7edeac33c817af28d73f3fbe1b31776ac34e8773 /src/effects/SkGpuBlurUtils.cpp | |
parent | e51ac563de24ed4b25fde97c225580a30a55e9ca (diff) |
Patch to create a distinct geometry processor. The vast majority of this patch
is just a rename. The meat is in GrGeometryProcessor, GrProcessor,
GrGL*Processor, GrProcessorStage, Gr*BackendProcessorFactory,
GrProcessUnitTestFactory, and the builders
BUG=skia:
R=bsalomon@google.com
Author: joshualitt@chromium.org
Review URL: https://codereview.chromium.org/582963002
Diffstat (limited to 'src/effects/SkGpuBlurUtils.cpp')
-rw-r--r-- | src/effects/SkGpuBlurUtils.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/effects/SkGpuBlurUtils.cpp b/src/effects/SkGpuBlurUtils.cpp index a9a53f2acf..76c3b3bb7f 100644 --- a/src/effects/SkGpuBlurUtils.cpp +++ b/src/effects/SkGpuBlurUtils.cpp @@ -54,10 +54,10 @@ static void convolve_gaussian_1d(GrContext* context, float bounds[2]) { GrPaint paint; paint.reset(); - SkAutoTUnref<GrEffect> conv(GrConvolutionEffect::CreateGaussian( + SkAutoTUnref<GrFragmentProcessor> conv(GrConvolutionEffect::CreateGaussian( texture, direction, radius, sigma, useBounds, bounds)); paint.reset(); - paint.addColorEffect(conv); + paint.addColorProcessor(conv); context->drawRectToRect(paint, dstRect, srcRect); } @@ -75,12 +75,12 @@ static void convolve_gaussian_2d(GrContext* context, SkIPoint kernelOffset = SkIPoint::Make(radiusX, radiusY); GrPaint paint; paint.reset(); - SkAutoTUnref<GrEffect> conv(GrMatrixConvolutionEffect::CreateGaussian( + SkAutoTUnref<GrFragmentProcessor> conv(GrMatrixConvolutionEffect::CreateGaussian( texture, bounds, size, 1.0, 0.0, kernelOffset, useBounds ? GrTextureDomain::kClamp_Mode : GrTextureDomain::kIgnore_Mode, true, sigmaX, sigmaY)); paint.reset(); - paint.addColorEffect(conv); + paint.addColorProcessor(conv); context->drawRectToRect(paint, dstRect, srcRect); } @@ -197,16 +197,16 @@ GrTexture* GaussianBlur(GrContext* context, matrix.mapRect(&domain, rect); domain.inset(i < scaleFactorX ? SK_ScalarHalf / srcTexture->width() : 0.0f, i < scaleFactorY ? SK_ScalarHalf / srcTexture->height() : 0.0f); - SkAutoTUnref<GrEffect> effect(GrTextureDomainEffect::Create( + SkAutoTUnref<GrFragmentProcessor> fp(GrTextureDomainEffect::Create( srcTexture, matrix, domain, GrTextureDomain::kDecal_Mode, GrTextureParams::kBilerp_FilterMode)); - paint.addColorEffect(effect); + paint.addColorProcessor(fp); } else { GrTextureParams params(SkShader::kClamp_TileMode, GrTextureParams::kBilerp_FilterMode); - paint.addColorTextureEffect(srcTexture, matrix, params); + paint.addColorTextureProcessor(srcTexture, matrix, params); } scale_rect(&dstRect, i < scaleFactorX ? 0.5f : 1.0f, i < scaleFactorY ? 0.5f : 1.0f); @@ -286,7 +286,7 @@ GrTexture* GaussianBlur(GrContext* context, GrPaint paint; // FIXME: this should be mitchell, not bilinear. GrTextureParams params(SkShader::kClamp_TileMode, GrTextureParams::kBilerp_FilterMode); - paint.addColorTextureEffect(srcTexture, matrix, params); + paint.addColorTextureProcessor(srcTexture, matrix, params); SkRect dstRect(srcRect); scale_rect(&dstRect, (float) scaleFactorX, (float) scaleFactorY); |