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

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

Issue 1767163003: Use float rather than SkFixed for gradient TileProcs. (Closed) Base URL: https://skia.googlesource.com/skia@scalar-pin-to-fixed
Patch Set: Created 4 years, 9 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/SkClampRange.h ('k') | src/effects/gradients/SkGradientShaderPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkClampRange.cpp
diff --git a/src/effects/gradients/SkClampRange.cpp b/src/effects/gradients/SkClampRange.cpp
index 0bf30f14eafda9b480f13a8a5a23b8cd2210851f..5bf0c6dbe33f8f5b8fc11639519f012f72232d06 100644
--- a/src/effects/gradients/SkClampRange.cpp
+++ b/src/effects/gradients/SkClampRange.cpp
@@ -65,9 +65,12 @@ void SkClampRange::initFor1(SkGradFixed fx) {
}
}
-void SkClampRange::init(SkGradFixed fx0, SkGradFixed dx0, int count, int v0, int v1) {
+void SkClampRange::init(float float_fx0, float float_dx0, int count, int v0, int v1) {
SkASSERT(count > 0);
+ SkGradFixed fx0 = SkFloatToGradFixed(float_fx0);
+ SkGradFixed dx0 = SkFloatToGradFixed(float_dx0);
+
fV0 = v0;
fV1 = v1;
« no previous file with comments | « src/effects/gradients/SkClampRange.h ('k') | src/effects/gradients/SkGradientShaderPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698