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

Unified Diff: src/effects/SkBlurMaskFilter.cpp

Issue 324543002: fix 10.6 shader tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | 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 80fa9f8fe4afd4b1af0f95298c81a5812a0fed25..fec429945ac651f0fbb32a278fa3cacc5d1c2207 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -630,7 +630,7 @@ void OutputRectBlurProfileLookup(GrGLShaderBuilder* builder,
const char *profileSize, const char *loc,
const char *blurred_width,
const char *sharp_width) {
- builder->fsCodeAppendf("\t\tfloat coord = (0.5 * (abs(2*%s - %s) - %s))/%s;\n",
+ builder->fsCodeAppendf("\t\tfloat coord = (0.5 * (abs(2.0*%s - %s) - %s))/%s;\n",
loc, blurred_width, sharp_width, profileSize);
builder->fsCodeAppendf("\t\t%s = ", output);
builder->fsAppendTextureLookup(sampler, "vec2(coord,0.5)");
@@ -670,7 +670,7 @@ void GrGLRectBlurEffect::emitCode(GrGLShaderBuilder* builder,
builder->fsCodeAppendf("\tfloat height = %s.w - %s.y;\n", rectName, rectName);
builder->fsCodeAppendf("\tvec2 smallDims = vec2(width - %s, height-%s);\n", profileSizeName, profileSizeName);
- builder->fsCodeAppendf("\tfloat center = 2.0 * floor(%s/2 + .25) - 1;\n", profileSizeName);
+ builder->fsCodeAppendf("\tfloat center = 2.0 * floor(%s/2.0 + .25) - 1.0;\n", profileSizeName);
builder->fsCodeAppendf("\tvec2 wh = smallDims - vec2(center,center);\n");
builder->fsCodeAppendf("\tfloat horiz_lookup;\n");
@@ -685,7 +685,7 @@ void GrGLRectBlurEffect::emitCode(GrGLShaderBuilder* builder,
builder->fsCodeAppendf("\tfloat final = 1.0 - horiz_lookup * vert_lookup;\n");
- builder->fsCodeAppendf("\t%s = vec4(final, final, final, 1);\n", outputColor );
+ builder->fsCodeAppendf("\t%s = vec4(final, final, final, 1.0);\n", outputColor );
}
void GrGLRectBlurEffect::setData(const GrGLUniformManager& uman,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698