|
|
Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
|
Move-only RAII owner for a single WebGPU handle. More...
#include "donner/svg/renderer/geode/GeodeWgpuUtil.h"
Public Member Functions | |
| ScopedWgpuHandle ()=default | |
| Construct an empty scoped handle. | |
| ScopedWgpuHandle (Handle handle) | |
| Take ownership of an existing +1 handle. | |
| ~ScopedWgpuHandle () | |
| Release the owned handle, if any. | |
| ScopedWgpuHandle (const ScopedWgpuHandle &)=delete | |
| ScopedWgpuHandle & | operator= (const ScopedWgpuHandle &)=delete |
| ScopedWgpuHandle (ScopedWgpuHandle &&other) noexcept | |
| Move ownership from another scoped handle. | |
| ScopedWgpuHandle & | operator= (ScopedWgpuHandle &&other) noexcept |
| Release the current handle and move ownership from another scoped handle. | |
| const Handle & | get () const noexcept |
| Return the owned handle. | |
| Handle & | get () noexcept |
| Return the owned handle. | |
| operator bool () const noexcept | |
| True when a non-null handle is owned. | |
| void | reset (Handle handle=Handle()) noexcept |
| Release the current handle and optionally take ownership of a replacement. | |
| Handle | take () noexcept |
| Return the owned handle without releasing it. | |
Static Public Member Functions | |
| static uint64_t | releaseCountForTesting () noexcept |
| Number of non-null handles released by this scoped-handle specialization. | |
Move-only RAII owner for a single WebGPU handle.
| Handle | A wgpu:: handle type with operator bool() and release(). |
The vendored webgpu.hpp wrapper is a thin typed wrapper over raw C handles: copying it does not retain, and destroying it does not release. Use this type when Donner owns a +1 reference from a WebGPU create/acquire call. Borrowed handles should remain plain wgpu:: values.