aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkHalf.cpp
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-03-29 09:03:52 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-29 09:03:53 -0700
commit9d524f22bfde5dc3dc8f48e1be39bdebd3bb0304 (patch)
treefc75ea6f8bc83b552d9ac9c9b4ac0d5a967ee5ac /src/core/SkHalf.cpp
parente577693b3be06d90c824538e7eac0b25b0e02a99 (diff)
Style bikeshed - remove extraneous whitespace
Diffstat (limited to 'src/core/SkHalf.cpp')
-rw-r--r--src/core/SkHalf.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/SkHalf.cpp b/src/core/SkHalf.cpp
index 0db979bc76..262362e076 100644
--- a/src/core/SkHalf.cpp
+++ b/src/core/SkHalf.cpp
@@ -34,18 +34,18 @@ SkHalf SkFloatToHalf(float f) {
static const uint32_t sign_mask = 0x80000000u;
static const uint32_t round_mask = ~0xfffu;
SkHalf o = 0;
-
+
FloatUIntUnion floatUnion;
floatUnion.fFloat = f;
-
+
uint32_t sign = floatUnion.fUInt & sign_mask;
floatUnion.fUInt ^= sign;
-
+
// NOTE all the integer compares in this function can be safely
// compiled into signed compares since all operands are below
// 0x80000000. Important if you want fast straight SSE2 code
// (since there's no unsigned PCMPGTD).
-
+
// Inf or NaN (all exponent bits set)
if (floatUnion.fUInt >= f32infty)
// NaN->qNaN and Inf->Inf
@@ -59,10 +59,10 @@ SkHalf SkFloatToHalf(float f) {
if (floatUnion.fUInt > f16infty) {
floatUnion.fUInt = f16infty;
}
-
+
o = floatUnion.fUInt >> 13; // Take the bits!
}
-
+
o |= sign >> 16;
return o;
}
@@ -72,7 +72,7 @@ SkHalf SkFloatToHalf(float f) {
float SkHalfToFloat(SkHalf h) {
static const FloatUIntUnion magic = { 126 << 23 };
FloatUIntUnion o;
-
+
if (halfExponent(h) == 0)
{
// Zero / Denormal
@@ -90,7 +90,7 @@ float SkHalfToFloat(SkHalf h) {
else
o.fUInt |= ((127 - 15 + halfExponent(h)) << 23);
}
-
+
// Set sign
o.fUInt |= (halfSign(h) << 31);
return o.fFloat;