commit | 12fb9cfeee071930b05ef37ad72419ae2e1b2592 | [log] [tgz] |
---|---|---|
author | Ethan Nicholas <ethannicholas@google.com> | Fri Aug 03 16:16:57 2018 -0400 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Mon Aug 06 13:49:47 2018 +0000 |
tree | 8b959b76b588575cc0d55b0a9c478a557525b54e | |
parent | 2e77f54f46e84ae9f6b2d7296be6fc92000497d1 [diff] [blame] |
added SkSL saturate() function Bug: skia:8220 Change-Id: Ib2e58ac77345a2aa53302c6c1484d52533556f93 Reviewed-on: https://skia-review.googlesource.com/145371 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp index 9831a11..6505944 100644 --- a/src/gpu/ops/GrAAConvexPathRenderer.cpp +++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -611,7 +611,7 @@ fragBuilder->codeAppendf("edgeAlpha = (%s.x*%s.x - %s.y);", v.fsIn(), v.fsIn(), v.fsIn()); fragBuilder->codeAppendf("edgeAlpha = " - "clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);}"); + "saturate(0.5 - edgeAlpha / length(gF));}"); fragBuilder->codeAppendf("%s = half4(edgeAlpha);", args.fOutputCoverage); }