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

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

Issue 593443002: Proposed fix for small bug in gpu conical gradients (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 6 years, 3 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/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
index 720dc6345d5014cf3da0a4c9d66bfd386fbd14d0..3ab086119280fbc97cfa70fae398759bdeaa3212 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
@@ -785,7 +785,7 @@ static ConicalType set_matrix_circle_conical(const SkTwoPointConicalGradient& sh
// to the edge shader. kEdgeErrorTol = 5 * kErrorTol was picked after manual testing
// so that C = 1 / A is stable, and the linear approximation used in the Edge shader is
// still accurate.
- if (SkScalarAbs(A) < kEdgeErrorTol) {
+ if (SkScalarAbs(centerEndTrans.length() - (radiusEnd - 1)) < kEdgeErrorTol) {
return kEdge_ConicalType;
}
« 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