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

Unified Diff: src/core/SkHalf.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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/core/SkGraphics.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkHalf.cpp
diff --git a/src/core/SkHalf.cpp b/src/core/SkHalf.cpp
index 0db979bc76614e15a19f44d5b08fdb9f514bdcc3..262362e0762b867546e0c53bfc042f3b488f1495 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;
« no previous file with comments | « src/core/SkGraphics.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698