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

Unified Diff: src/effects/gradients/SkSweepGradient.cpp

Issue 2223203003: Exact Ganesh Gradients for Special Cases (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove unused field fSubGradients, fix valgrind 'uninitialized value' bug Created 4 years, 4 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 | « src/effects/gradients/SkGradientShaderPriv.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkSweepGradient.cpp
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index 6e32aa3b7b5eb0da137f1a283180e197e65de2a0..505cfd2c95d4d722e038afe9a51232f982e8aa29 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -218,10 +218,10 @@ void GrSweepGradient::GLSLSweepProcessor::emitCode(EmitArgs& args) {
// On Intel GPU there is an issue where it reads the second arguement to atan "- %s.x" as an int
// thus must us -1.0 * %s.x to work correctly
if (args.fGLSLCaps->mustForceNegatedAtanParamToFloat()){
- t.printf("atan(- %s.y, -1.0 * %s.x) * 0.1591549430918 + 0.5",
+ t.printf("(atan(- %s.y, -1.0 * %s.x) * 0.1591549430918 + 0.5)",
coords2D.c_str(), coords2D.c_str());
} else {
- t.printf("atan(- %s.y, - %s.x) * 0.1591549430918 + 0.5",
+ t.printf("(atan(- %s.y, - %s.x) * 0.1591549430918 + 0.5)",
coords2D.c_str(), coords2D.c_str());
}
this->emitColor(args.fFragBuilder,
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698