Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Unified Diff: src/effects/SkGpuBlurUtils.cpp

Issue 582963002: Solo gp (Closed) Base URL: https://skia.googlesource.com/skia.git@no_peb
Patch Set: rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkGpuBlurUtils.cpp
diff --git a/src/effects/SkGpuBlurUtils.cpp b/src/effects/SkGpuBlurUtils.cpp
index a9a53f2acf5a8da8e6cadbc72e2f52b135feecad..76c3b3bb7fe5dd609e461fd4c43cf21a362362e6 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);
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698