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

Unified Diff: src/effects/SkBlurMaskFilter.cpp

Issue 292773003: fix off-by-one error in texture coordinate calculations for rrect gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove debug statement Created 6 years, 7 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 | « expectations/gm/ignored-tests.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMaskFilter.cpp
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 2169a42cb6df9e043b34209de947f3d101d908a3..f263a027842a61fb0ea9344b57570882c881a59f 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");
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698