OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2008 The Android Open Source Project | 3 * Copyright 2008 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkFloatBits_DEFINED | 10 #ifndef SkFloatBits_DEFINED |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 /** Return the ceiling of the float as an int. | 121 /** Return the ceiling of the float as an int. |
122 If the value is out of range, or NaN, return +/- SK_MaxS32 | 122 If the value is out of range, or NaN, return +/- SK_MaxS32 |
123 */ | 123 */ |
124 static inline int32_t SkFloatToIntCeil(float x) { | 124 static inline int32_t SkFloatToIntCeil(float x) { |
125 return SkFloatBits_toIntCeil(SkFloat2Bits(x)); | 125 return SkFloatBits_toIntCeil(SkFloat2Bits(x)); |
126 } | 126 } |
127 | 127 |
128 // Scalar wrappers for float-bit routines | 128 // Scalar wrappers for float-bit routines |
129 | 129 |
130 #ifdef SK_SCALAR_IS_FLOAT | 130 #define SkScalarAs2sCompliment(x) SkFloatAs2sCompliment(x) |
131 #define SkScalarAs2sCompliment(x) SkFloatAs2sCompliment(x) | 131 #define Sk2sComplimentAsScalar(x) Sk2sComplimentAsFloat(x) |
132 #define Sk2sComplimentAsScalar(x) Sk2sComplimentAsFloat(x) | |
133 #else | |
134 #define SkScalarAs2sCompliment(x) (x) | |
135 #define Sk2sComplimentAsScalar(x) (x) | |
136 #endif | |
137 | 132 |
138 #endif | 133 #endif |
OLD | NEW |