| 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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 /////////////////////////////////////////////////////////////////////////////// | 435 /////////////////////////////////////////////////////////////////////////////// |
| 436 | 436 |
| 437 /** | 437 /** |
| 438 * Indicates whether an allocation should count against a cache budget. | 438 * Indicates whether an allocation should count against a cache budget. |
| 439 */ | 439 */ |
| 440 enum class SkBudgeted : bool { | 440 enum class SkBudgeted : bool { |
| 441 kNo = false, | 441 kNo = false, |
| 442 kYes = true | 442 kYes = true |
| 443 }; | 443 }; |
| 444 | 444 |
| 445 /** | |
| 446 * Indicates whether a backing store needs to be an exact match or can be larger | |
| 447 * than is strictly necessary | |
| 448 */ | |
| 449 enum class SkBackingFit { | |
| 450 kApprox, | |
| 451 kExact | |
| 452 }; | |
| 453 | |
| 454 /////////////////////////////////////////////////////////////////////////////// | 445 /////////////////////////////////////////////////////////////////////////////// |
| 455 | 446 |
| 456 /** Use to combine multiple bits in a bitmask in a type safe way. | 447 /** Use to combine multiple bits in a bitmask in a type safe way. |
| 457 */ | 448 */ |
| 458 template <typename T> | 449 template <typename T> |
| 459 T SkTBitOr(T a, T b) { | 450 T SkTBitOr(T a, T b) { |
| 460 return (T)(a | b); | 451 return (T)(a | b); |
| 461 } | 452 } |
| 462 | 453 |
| 463 /** | 454 /** |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 | 691 |
| 701 void* fPtr; | 692 void* fPtr; |
| 702 size_t fSize; // can be larger than the requested size (see kReuse) | 693 size_t fSize; // can be larger than the requested size (see kReuse) |
| 703 uint32_t fStorage[kSize >> 2]; | 694 uint32_t fStorage[kSize >> 2]; |
| 704 }; | 695 }; |
| 705 // Can't guard the constructor because it's a template class. | 696 // Can't guard the constructor because it's a template class. |
| 706 | 697 |
| 707 #endif /* C++ */ | 698 #endif /* C++ */ |
| 708 | 699 |
| 709 #endif | 700 #endif |
| OLD | NEW |