diff options
Diffstat (limited to 'include/core/SkFDot6.h')
-rw-r--r-- | include/core/SkFDot6.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/include/core/SkFDot6.h b/include/core/SkFDot6.h index a4b9cf7..9d56116 100644 --- a/include/core/SkFDot6.h +++ b/include/core/SkFDot6.h @@ -21,12 +21,11 @@ typedef int32_t SkFDot6; -#define SK_FDot61 (64) +#define SK_FDot6One (64) #define SK_FDot6Half (32) #ifdef SK_DEBUG - inline SkFDot6 SkIntToFDot6(S16CPU x) - { + inline SkFDot6 SkIntToFDot6(S16CPU x) { SkASSERT(SkToS16(x) == x); return x << 6; } @@ -40,8 +39,7 @@ typedef int32_t SkFDot6; #define SkFixedToFDot6(x) ((x) >> 10) -inline SkFixed SkFDot6ToFixed(SkFDot6 x) -{ +inline SkFixed SkFDot6ToFixed(SkFDot6 x) { SkASSERT((x << 10 >> 10) == x); return x << 10; @@ -53,14 +51,14 @@ inline SkFixed SkFDot6ToFixed(SkFDot6 x) #define SkScalarToFDot6(x) ((x) >> 10) #endif -inline SkFixed SkFDot6Div(SkFDot6 a, SkFDot6 b) -{ +inline SkFixed SkFDot6Div(SkFDot6 a, SkFDot6 b) { SkASSERT(b != 0); - if (a == (int16_t)a) + if (a == (int16_t)a) { return (a << 16) / b; - else + } else { return SkFixedDiv(a, b); + } } #endif |