| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 /** maximum representable milliseconds | 308 /** maximum representable milliseconds |
| 309 */ | 309 */ |
| 310 #define SK_MSecMax 0x7FFFFFFF | 310 #define SK_MSecMax 0x7FFFFFFF |
| 311 /** Returns a < b for milliseconds, correctly handling wrap-around from 0xFFFFFF
FF to 0 | 311 /** Returns a < b for milliseconds, correctly handling wrap-around from 0xFFFFFF
FF to 0 |
| 312 */ | 312 */ |
| 313 #define SkMSec_LT(a, b) ((int32_t)(a) - (int32_t)(b) < 0) | 313 #define SkMSec_LT(a, b) ((int32_t)(a) - (int32_t)(b) < 0) |
| 314 /** Returns a <= b for milliseconds, correctly handling wrap-around from 0xFFFFF
FFF to 0 | 314 /** Returns a <= b for milliseconds, correctly handling wrap-around from 0xFFFFF
FFF to 0 |
| 315 */ | 315 */ |
| 316 #define SkMSec_LE(a, b) ((int32_t)(a) - (int32_t)(b) <= 0) | 316 #define SkMSec_LE(a, b) ((int32_t)(a) - (int32_t)(b) <= 0) |
| 317 | 317 |
| 318 /** 64 bit value to hold nanosecond count | |
| 319 */ | |
| 320 typedef uint64_t SkNSec; | |
| 321 | |
| 322 /** The generation IDs in Skia reserve 0 has an invalid marker. | 318 /** The generation IDs in Skia reserve 0 has an invalid marker. |
| 323 */ | 319 */ |
| 324 #define SK_InvalidGenID 0 | 320 #define SK_InvalidGenID 0 |
| 325 | 321 |
| 326 /**************************************************************************** | 322 /**************************************************************************** |
| 327 The rest of these only build with C++ | 323 The rest of these only build with C++ |
| 328 */ | 324 */ |
| 329 #ifdef __cplusplus | 325 #ifdef __cplusplus |
| 330 | 326 |
| 331 /** Faster than SkToBool for integral conditions. Returns 0 or 1 | 327 /** Faster than SkToBool for integral conditions. Returns 0 or 1 |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 private: | 655 private: |
| 660 void* fPtr; | 656 void* fPtr; |
| 661 size_t fSize; // can be larger than the requested size (see kReuse) | 657 size_t fSize; // can be larger than the requested size (see kReuse) |
| 662 uint32_t fStorage[(kSize + 3) >> 2]; | 658 uint32_t fStorage[(kSize + 3) >> 2]; |
| 663 }; | 659 }; |
| 664 // Can't guard the constructor because it's a template class. | 660 // Can't guard the constructor because it's a template class. |
| 665 | 661 |
| 666 #endif /* C++ */ | 662 #endif /* C++ */ |
| 667 | 663 |
| 668 #endif | 664 #endif |
| OLD | NEW |