aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-19 18:51:05 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-19 18:51:05 +0000
commit7ba1702bbb52da72da3e2638c895e2080e1625f9 (patch)
tree7e0f39b27646865731c560e1f54aa8eb97bfb07f /src/effects
parent8d093d505941cfec47bdd2a53e5e6e36e6a1cede (diff)
fix off-by-one error in texture coordinate calculations for rrect gpu
blur; output now matches CPU BUG= R=bsalomon@google.com Author: humper@google.com Review URL: https://codereview.chromium.org/292773003 git-svn-id: http://skia.googlecode.com/svn/trunk@14788 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkBlurMaskFilter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 2169a42cb6..f263a02784 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -1040,13 +1040,13 @@ void GrGLRRectBlurEffect::emitCode(GrGLShaderBuilder* builder,
builder->fsCodeAppendf("\t\tif (translatedFragPos.x >= threshold && translatedFragPos.x < (middle.x+threshold)) {\n" );
builder->fsCodeAppendf("\t\t\ttranslatedFragPos.x = threshold;\n");
builder->fsCodeAppendf("\t\t} else if (translatedFragPos.x >= (middle.x + threshold)) {\n");
- builder->fsCodeAppendf("\t\t\ttranslatedFragPos.x -= middle.x;\n");
+ builder->fsCodeAppendf("\t\t\ttranslatedFragPos.x -= middle.x - 1.0;\n");
builder->fsCodeAppendf("\t\t}\n");
builder->fsCodeAppendf("\t\tif (translatedFragPos.y > threshold && translatedFragPos.y < (middle.y+threshold)) {\n" );
builder->fsCodeAppendf("\t\t\ttranslatedFragPos.y = threshold;\n");
builder->fsCodeAppendf("\t\t} else if (translatedFragPos.y >= (middle.y + threshold)) {\n");
- builder->fsCodeAppendf("\t\t\ttranslatedFragPos.y -= middle.y;\n");
+ builder->fsCodeAppendf("\t\t\ttranslatedFragPos.y -= middle.y - 1.0;\n");
builder->fsCodeAppendf("\t\t}\n");
builder->fsCodeAppendf("\t\tvec2 proxyDims = vec2(2.0*threshold+1.0);\n");