|
TachyonUI 0.1.0
High-performance UI for building tools.
|
Handle to a reference-counted GradientManager atlas slot. More...
#include <gui_core/style/gui_gradient_manager.h>
Public Member Functions | |
| constexpr | GradientHandle ()=default |
| constexpr | GradientHandle (uint32_t v) |
| constexpr bool | IsValid () const |
| Not the invalid handle; GradientManager::IsValid also checks it's still live. | |
| constexpr uint32_t | SlotIndex () const |
| 1-based; 0 = invalid | |
| constexpr uint8_t | Generation () const |
| wraps around | |
| constexpr bool | operator== (const GradientHandle &) const noexcept=default |
Static Public Member Functions | |
| static constexpr GradientHandle | Invalid () |
| the invalid handle | |
| static constexpr GradientHandle | Make (uint32_t slotIndex1Based, uint8_t generation) |
| Encodes a slot index (1-based) and generation. | |
Public Attributes | |
| uint32_t | value = 0 |
| encoded slot index and generation | |
Handle to a reference-counted GradientManager atlas slot.
0 is invalid; otherwise the high 24 bits are the 1-based slot index and the low 8 bits its generation.
Each Acquire* (a new slot at refcount 1, or the existing handle on dedup) pairs with exactly one Release, as does each AddRef. At refcount 0 the slot is freed and its pixels may be reused.
|
constexprdefault |
|
inlineexplicitconstexpr |
|
inlineconstexpr |
Not the invalid handle; GradientManager::IsValid also checks it's still live.
|
inlineconstexpr |
1-based; 0 = invalid
|
inlineconstexpr |
wraps around
|
constexprdefaultnoexcept |
|
inlinestaticconstexpr |
the invalid handle
|
inlinestaticconstexpr |
Encodes a slot index (1-based) and generation.
| uint32_t tachyon::GradientHandle::value = 0 |
encoded slot index and generation