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

Unified Diff: src/gpu/effects/GrDashingEffect.cpp

Issue 361253002: Fix int to float bug in shader on gpu Dotted Line cl (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/gpu/effects/GrDashingEffect.cpp
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index 49169f1051a45eddc277c066c1ca4190f3bcbc08..e46cc040c7fcfed7a206e43e5fc277f1fd5d4728 100644
--- a/src/gpu/effects/GrDashingEffect.cpp
+++ b/src/gpu/effects/GrDashingEffect.cpp
@@ -526,7 +526,7 @@ void GLDashingCircleEffect::emitCode(GrGLFullShaderBuilder* builder,
builder->fsCodeAppend("\t\tfloat dist = length(center - fragPosShifted);\n");
if (GrEffectEdgeTypeIsAA(dce.getEdgeType())) {
builder->fsCodeAppendf("\t\tfloat diff = dist - %s.x;\n", paramName);
- builder->fsCodeAppend("\t\tdiff = 1 - diff;\n");
+ builder->fsCodeAppend("\t\tdiff = 1.0 - diff;\n");
builder->fsCodeAppend("\t\tfloat alpha = clamp(diff, 0.0, 1.0);\n");
} else {
builder->fsCodeAppendf("\t\tfloat alpha = 1.0;\n");
« 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