Index: src/effects/gradients/SkTwoPointConicalGradient.h |
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.h b/src/effects/gradients/SkTwoPointConicalGradient.h |
index 5783c39bd4769e7274064fd086ec02311d69430d..11f1afe8a26fd15ec147296fbfcf3dc8b7b99344 100644 |
--- a/src/effects/gradients/SkTwoPointConicalGradient.h |
+++ b/src/effects/gradients/SkTwoPointConicalGradient.h |
@@ -9,15 +9,14 @@ |
#ifndef SkTwoPointConicalGradient_DEFINED |
#define SkTwoPointConicalGradient_DEFINED |
+#include "math.h" |
+ |
#include "SkGradientShaderPriv.h" |
// TODO(dominikg): Worth making it truly immutable (i.e. set values in constructor)? |
// Should only be initialized once via init(). Immutable afterwards. |
struct TwoPtRadial { |
- enum { |
- // This value is outside the range SK_FixedMin to SK_FixedMax. |
- kDontDrawT = 0x80000000 |
- }; |
+ static const float kDontDrawT; |
float fCenterX, fCenterY; |
float fDCenterX, fDCenterY; |
@@ -32,8 +31,8 @@ struct TwoPtRadial { |
const SkPoint& center1, SkScalar rad1, |
bool flipped); |
- static bool DontDrawT(SkFixed t) { |
- return kDontDrawT == (uint32_t)t; |
+ static bool DontDrawT(float t) { |
+ return isnan(t); |
} |
}; |