Index: src/core/SkMaskGamma.cpp |
diff --git a/src/core/SkMaskGamma.cpp b/src/core/SkMaskGamma.cpp |
index 9066fb7d9fe654228849297a8b29c2e4a5d48dd5..a305d72162888ab39420ba4fc29fc1d13e7f1fee 100644 |
--- a/src/core/SkMaskGamma.cpp |
+++ b/src/core/SkMaskGamma.cpp |
@@ -36,21 +36,21 @@ class SkSRGBColorSpaceLuminance : public SkColorSpaceLuminance { |
SkASSERT(0 == gamma); |
//The magic numbers are derived from the sRGB specification. |
//See http://www.color.org/chardata/rgb/srgb.xalter . |
- if (luminance <= SkFloatToScalar(0.04045f)) { |
- return luminance / SkFloatToScalar(12.92f); |
+ if (luminance <= 0.04045f) { |
+ return luminance / 12.92f; |
} |
- return SkScalarPow((luminance + SkFloatToScalar(0.055f)) / SkFloatToScalar(1.055f), |
- SkFloatToScalar(2.4f)); |
+ return SkScalarPow((luminance + 0.055f) / 1.055f, |
+ 2.4f); |
} |
virtual SkScalar fromLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luma) const SK_OVERRIDE { |
SkASSERT(0 == gamma); |
//The magic numbers are derived from the sRGB specification. |
//See http://www.color.org/chardata/rgb/srgb.xalter . |
- if (luma <= SkFloatToScalar(0.0031308f)) { |
- return luma * SkFloatToScalar(12.92f); |
+ if (luma <= 0.0031308f) { |
+ return luma * 12.92f; |
} |
- return SkFloatToScalar(1.055f) * SkScalarPow(luma, SkScalarInvert(SkFloatToScalar(2.4f))) |
- - SkFloatToScalar(0.055f); |
+ return 1.055f * SkScalarPow(luma, SkScalarInvert(2.4f)) |
+ - 0.055f; |
} |
}; |