|
|
Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
|
Copyable non-owning reference to a Handle, used inside descriptor structs. More...
#include "donner/gpu/Handles.h"
Public Member Functions | |
| HandleRef ()=default | |
| Constructs a null reference. | |
| HandleRef (const Handle< Tag > &handle) | |
Implicitly references handle. | |
| bool | isValid () const |
| Returns true if this reference is non-null. | |
| uint32_t | slotIndex () const |
| Resource table slot index, for backend use. | |
| uint32_t | generation () const |
| Slot generation at creation time, for backend use. Zero for null references. | |
| uint64_t | deviceId () const |
| Identity of the owning device, for backend use. Zero for null references. | |
Friends | |
| bool | operator== (const HandleRef &ref, std::nullptr_t) |
| Compares against null: true if the reference is null. | |
Copyable non-owning reference to a Handle, used inside descriptor structs.
Handles are move-only, so descriptors reference them through this identity-only view instead. The device re-validates slot, generation, and device identity when the descriptor is consumed, so a stale or foreign reference fails closed exactly like a stale or foreign handle.
| Tag | Tag type identifying the resource type. |
|
inline |
Implicitly references handle.
The reference does not keep the resource alive.
| handle | Handle to reference. |
|
friend |
Compares against null: true if the reference is null.
| ref | Reference to test. |