| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 | 293 |
| 294 #define SkAlign2(x) (((x) + 1) >> 1 << 1) | 294 #define SkAlign2(x) (((x) + 1) >> 1 << 1) |
| 295 #define SkIsAlign2(x) (0 == ((x) & 1)) | 295 #define SkIsAlign2(x) (0 == ((x) & 1)) |
| 296 | 296 |
| 297 #define SkAlign4(x) (((x) + 3) >> 2 << 2) | 297 #define SkAlign4(x) (((x) + 3) >> 2 << 2) |
| 298 #define SkIsAlign4(x) (0 == ((x) & 3)) | 298 #define SkIsAlign4(x) (0 == ((x) & 3)) |
| 299 | 299 |
| 300 #define SkAlign8(x) (((x) + 7) >> 3 << 3) | 300 #define SkAlign8(x) (((x) + 7) >> 3 << 3) |
| 301 #define SkIsAlign8(x) (0 == ((x) & 7)) | 301 #define SkIsAlign8(x) (0 == ((x) & 7)) |
| 302 | 302 |
| 303 #define SkAlign16(x) (((x) + 15) >> 4 << 4) | |
| 304 #define SkIsAlign16(x) (0 == ((x) & 15)) | |
| 305 | |
| 306 #define SkAlignPtr(x) (sizeof(void*) == 8 ? SkAlign8(x) : SkAlign4(x)) | 303 #define SkAlignPtr(x) (sizeof(void*) == 8 ? SkAlign8(x) : SkAlign4(x)) |
| 307 #define SkIsAlignPtr(x) (sizeof(void*) == 8 ? SkIsAlign8(x) : SkIsAlign4(x)) | 304 #define SkIsAlignPtr(x) (sizeof(void*) == 8 ? SkIsAlign8(x) : SkIsAlign4(x)) |
| 308 | 305 |
| 309 typedef uint32_t SkFourByteTag; | 306 typedef uint32_t SkFourByteTag; |
| 310 #define SkSetFourByteTag(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8)
| (d)) | 307 #define SkSetFourByteTag(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8)
| (d)) |
| 311 | 308 |
| 312 /** 32 bit integer to hold a unicode value | 309 /** 32 bit integer to hold a unicode value |
| 313 */ | 310 */ |
| 314 typedef int32_t SkUnichar; | 311 typedef int32_t SkUnichar; |
| 315 /** 32 bit value to hold a millisecond count | 312 /** 32 bit value to hold a millisecond count |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 private: | 668 private: |
| 672 void* fPtr; | 669 void* fPtr; |
| 673 size_t fSize; // can be larger than the requested size (see kReuse) | 670 size_t fSize; // can be larger than the requested size (see kReuse) |
| 674 uint32_t fStorage[(kSize + 3) >> 2]; | 671 uint32_t fStorage[(kSize + 3) >> 2]; |
| 675 }; | 672 }; |
| 676 // Can't guard the constructor because it's a template class. | 673 // Can't guard the constructor because it's a template class. |
| 677 | 674 |
| 678 #endif /* C++ */ | 675 #endif /* C++ */ |
| 679 | 676 |
| 680 #endif | 677 #endif |
| OLD | NEW |