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

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

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 | « include/core/SkScalar.h ('k') | src/effects/gradients/SkClampRange.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkClampRange.h
diff --git a/src/effects/gradients/SkClampRange.h b/src/effects/gradients/SkClampRange.h
index d3d2d08c86d8a38861a24e3ba009dfa32cf1f8dd..5b121a5b442bace50fa54e041484264c14c11a84 100644
--- a/src/effects/gradients/SkClampRange.h
+++ b/src/effects/gradients/SkClampRange.h
@@ -13,8 +13,10 @@
#define SkGradFixed SkFixed3232
#define SkScalarToGradFixed(x) SkScalarToFixed3232(x)
+#define SkFloatToGradFixed(x) SkFloatToFixed3232(x)
#define SkFixedToGradFixed(x) SkFixedToFixed3232(x)
#define SkGradFixedToFixed(x) (SkFixed)((x) >> 16)
+#define SkGradFixedToFloat(x) SkFixed3232ToFloat(x)
#define kFracMax_SkGradFixed 0xFFFFFFFFLL
/**
@@ -33,7 +35,7 @@ struct SkClampRange {
// only valid if fCount1 > 0
int fV0, fV1;
- void init(SkGradFixed fx, SkGradFixed dx, int count, int v0, int v1);
+ void init(float fx, float dx, int count, int v0, int v1);
void validate(int count) const {
#ifdef SK_DEBUG
« no previous file with comments | « include/core/SkScalar.h ('k') | src/effects/gradients/SkClampRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698