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
This commit is contained in:
parent
8d093d5059
commit
7ba1702bbb
@ -48,3 +48,7 @@ dashing
|
||||
dashing2
|
||||
dashing3
|
||||
dashcubics
|
||||
|
||||
# humper: https://codereview.chromium.org/292773003/
|
||||
# changed texture coordinate generation for GPU rrect blur; will rebaseline after land.
|
||||
simpleblurroundrect
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user