Index: src/gpu/effects/GrDistanceFieldGeoProc.cpp |
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp |
index 08fa5ac6d55eebfd0b288716e23f991c367121bb..4f8da160e7a11e907180b0e6b592c9e4e5c3d1e0 100644 |
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp |
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp |
@@ -633,8 +633,10 @@ public: |
fsBuilder->codeAppend( |
"vec4 val = vec4(smoothstep(vec3(-afwidth), vec3(afwidth), distance), 1.0);"); |
+ // set alpha to be max of rgb coverage |
+ fsBuilder->codeAppend("val.a = max(max(val.r, val.g), val.b);"); |
- fsBuilder->codeAppendf("%s = vec4(val);", args.fOutputCoverage); |
+ fsBuilder->codeAppendf("%s = val;", args.fOutputCoverage); |
} |
void setData(const GrGLProgramDataManager& pdman, |