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 |
318 /** The generation IDs in Skia reserve 0 has an invalid marker. | 322 /** The generation IDs in Skia reserve 0 has an invalid marker. |
319 */ | 323 */ |
320 #define SK_InvalidGenID 0 | 324 #define SK_InvalidGenID 0 |
321 | 325 |
322 /**************************************************************************** | 326 /**************************************************************************** |
323 The rest of these only build with C++ | 327 The rest of these only build with C++ |
324 */ | 328 */ |
325 #ifdef __cplusplus | 329 #ifdef __cplusplus |
326 | 330 |
327 /** Faster than SkToBool for integral conditions. Returns 0 or 1 | 331 /** Faster than SkToBool for integral conditions. Returns 0 or 1 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 private: | 659 private: |
656 void* fPtr; | 660 void* fPtr; |
657 size_t fSize; // can be larger than the requested size (see kReuse) | 661 size_t fSize; // can be larger than the requested size (see kReuse) |
658 uint32_t fStorage[(kSize + 3) >> 2]; | 662 uint32_t fStorage[(kSize + 3) >> 2]; |
659 }; | 663 }; |
660 // Can't guard the constructor because it's a template class. | 664 // Can't guard the constructor because it's a template class. |
661 | 665 |
662 #endif /* C++ */ | 666 #endif /* C++ */ |
663 | 667 |
664 #endif | 668 #endif |
OLD | NEW |