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

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

Issue 1754113003: Revert of Fix SkTwoPointConicalGradient zero-radius handling (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | tests/GradientTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkTwoPointConicalGradient.cpp
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 2209306fe3877b1d1106dd54fe881d6a99907a0a..b938ebdec7a9bdcbd00b2e4fe26b5b3ab11b593e 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -122,10 +122,10 @@
// find_quad_roots returns the values sorted, so we start with the last
float t = roots[countRoots - 1];
float r = lerp(fRec.fRadius, fRec.fDRadius, t);
- if (r < 0) {
+ if (r <= 0) {
t = roots[0]; // might be the same as roots[countRoots-1]
r = lerp(fRec.fRadius, fRec.fDRadius, t);
- if (r < 0) {
+ if (r <= 0) {
return TwoPtRadial::kDontDrawT;
}
}
« no previous file with comments | « no previous file | tests/GradientTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698