aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-05-09 10:40:27 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-09 15:12:15 +0000
commite8f9e913b6daca22f0760e979cdd95580d2a836b (patch)
tree071f08c152cdb98fa2d41d9413d0b5be5aea6ae8 /src
parent9739d7cf2b4ac86c2d1e23c8f1aa6f029b9a3964 (diff)
Cleanup SK_IGNORE_BLUR_IMAGE_FILTER_FIX (since Chrome no longer uses it)
Change-Id: I3eebd6233d6f6a8b43ce0d865ffafd85d58f0c16 Reviewed-on: https://skia-review.googlesource.com/126926 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/SkGpuBlurUtils.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/core/SkGpuBlurUtils.cpp b/src/core/SkGpuBlurUtils.cpp
index 84cf8301a7..c75ff3e875 100644
--- a/src/core/SkGpuBlurUtils.cpp
+++ b/src/core/SkGpuBlurUtils.cpp
@@ -164,8 +164,7 @@ static sk_sp<GrRenderTargetContext> convolve_gaussian(GrContext* context,
SkIRect* contentRect,
GrTextureDomain::Mode mode,
const SkImageInfo& dstII,
- SkBackingFit fit,
- int radiusY /* temporarary*/) {
+ SkBackingFit fit) {
SkASSERT(srcRect.width() <= dstII.width() && srcRect.height() <= dstII.height());
GrPixelConfig config = get_blur_config(proxy.get(), dstII.colorSpace());
@@ -185,13 +184,7 @@ static sk_sp<GrRenderTargetContext> convolve_gaussian(GrContext* context,
int bounds[2] = { 0, 0 };
SkIRect dstRect = SkIRect::MakeWH(srcRect.width(), srcRect.height());
if (GrTextureDomain::kIgnore_Mode == mode) {
-#ifdef SK_IGNORE_BLUR_IMAGE_FILTER_FIX
- if (Direction::kX == direction) {
- *contentRect = dstRect;
- }
-#else
*contentRect = dstRect;
-#endif
convolve_gaussian_1d(dstRenderTargetContext.get(), clip, dstRect, srcOffset,
std::move(proxy), direction, radius, sigma,
GrTextureDomain::kIgnore_Mode, bounds);
@@ -213,18 +206,10 @@ static sk_sp<GrRenderTargetContext> convolve_gaussian(GrContext* context,
dstRect.fTop = midRect.top();
dstRect.fBottom = midRect.bottom();
-#ifdef SK_IGNORE_BLUR_IMAGE_FILTER_FIX
- *contentRect = SkIRect::MakeWH(srcRect.width(), srcRect.height());
- if (GrTextureDomain::kClamp_Mode == mode) {
- // We need to adjust bounds because we only fill part of the srcRect in x-pass.
- contentRect->inset(0, radiusY);
- }
-#else
contentRect->fLeft = dstRect.fLeft;
contentRect->fTop = midRect.fTop;
contentRect->fRight = dstRect.fRight;
contentRect->fBottom = midRect.fBottom;
-#endif
} else {
bounds[0] = contentRect->top();
bounds[1] = contentRect->bottom();
@@ -237,12 +222,10 @@ static sk_sp<GrRenderTargetContext> convolve_gaussian(GrContext* context,
dstRect.fLeft = midRect.left();
dstRect.fRight = midRect.right();
-#ifndef SK_IGNORE_BLUR_IMAGE_FILTER_FIX
contentRect->fLeft = midRect.fLeft;
contentRect->fTop = dstRect.fTop;
contentRect->fRight = midRect.fRight;
contentRect->fBottom = dstRect.fBottom;
-#endif
}
if (!topRect.isEmpty()) {
dstRenderTargetContext->clear(&topRect, 0, GrRenderTargetContext::CanClearFullscreen::kNo);
@@ -517,7 +500,7 @@ sk_sp<GrRenderTargetContext> GaussianBlur(GrContext* context,
if (sigmaX > 0.0f) {
dstRenderTargetContext = convolve_gaussian(context, std::move(srcProxy), srcRect, srcOffset,
Direction::kX, radiusX, sigmaX, &localSrcBounds,
- mode, finalDestII, xFit, radiusY);
+ mode, finalDestII, xFit);
if (!dstRenderTargetContext) {
return nullptr;
}
@@ -542,7 +525,7 @@ sk_sp<GrRenderTargetContext> GaussianBlur(GrContext* context,
if (sigmaY > 0.0f) {
dstRenderTargetContext = convolve_gaussian(context, std::move(srcProxy), srcRect, srcOffset,
Direction::kY, radiusY, sigmaY, &localSrcBounds,
- mode, finalDestII, yFit, radiusY);
+ mode, finalDestII, yFit);
if (!dstRenderTargetContext) {
return nullptr;
}