| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkTypes_DEFINED | 8 #ifndef SkTypes_DEFINED |
| 9 #define SkTypes_DEFINED | 9 #define SkTypes_DEFINED |
| 10 | 10 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 #define SkToBool(cond) ((cond) != 0) | 283 #define SkToBool(cond) ((cond) != 0) |
| 284 | 284 |
| 285 #define SK_MaxS16 32767 | 285 #define SK_MaxS16 32767 |
| 286 #define SK_MinS16 -32767 | 286 #define SK_MinS16 -32767 |
| 287 #define SK_MaxU16 0xFFFF | 287 #define SK_MaxU16 0xFFFF |
| 288 #define SK_MinU16 0 | 288 #define SK_MinU16 0 |
| 289 #define SK_MaxS32 0x7FFFFFFF | 289 #define SK_MaxS32 0x7FFFFFFF |
| 290 #define SK_MinS32 -SK_MaxS32 | 290 #define SK_MinS32 -SK_MaxS32 |
| 291 #define SK_MaxU32 0xFFFFFFFF | 291 #define SK_MaxU32 0xFFFFFFFF |
| 292 #define SK_MinU32 0 | 292 #define SK_MinU32 0 |
| 293 #define SK_NaN32 (1 << 31) | 293 #define SK_NaN32 ((int) (1U << 31)) |
| 294 | 294 |
| 295 /** Returns true if the value can be represented with signed 16bits | 295 /** Returns true if the value can be represented with signed 16bits |
| 296 */ | 296 */ |
| 297 static inline bool SkIsS16(long x) { | 297 static inline bool SkIsS16(long x) { |
| 298 return (int16_t)x == x; | 298 return (int16_t)x == x; |
| 299 } | 299 } |
| 300 | 300 |
| 301 /** Returns true if the value can be represented with unsigned 16bits | 301 /** Returns true if the value can be represented with unsigned 16bits |
| 302 */ | 302 */ |
| 303 static inline bool SkIsU16(long x) { | 303 static inline bool SkIsU16(long x) { |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 | 706 |
| 707 void* fPtr; | 707 void* fPtr; |
| 708 size_t fSize; // can be larger than the requested size (see kReuse) | 708 size_t fSize; // can be larger than the requested size (see kReuse) |
| 709 uint32_t fStorage[kSize >> 2]; | 709 uint32_t fStorage[kSize >> 2]; |
| 710 }; | 710 }; |
| 711 // Can't guard the constructor because it's a template class. | 711 // Can't guard the constructor because it's a template class. |
| 712 | 712 |
| 713 #endif /* C++ */ | 713 #endif /* C++ */ |
| 714 | 714 |
| 715 #endif | 715 #endif |
| OLD | NEW |