donner::gpu::browser::BrowserObjectTable - checked identifiers for browser-owned objects.
More...
#include <array>#include <cstddef>#include <cstdint>#include <optional>#include <ostream>#include <string_view>#include <utility>#include <vector>Classes | |
| struct | donner::gpu::browser::BrowserObjectInsertion |
| What BrowserObjectTable::insert did: the identifier it minted, and any identifier the slot was still holding. More... | |
| class | donner::gpu::browser::BrowserObjectTable |
| Maps the runtime's per-kind resource slots to the identifiers the browser side knows them by. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Typedefs | |
| using | donner::gpu::browser::BrowserObjectId = uint32_t |
| Identifier of one object the browser side owns. | |
Enumerations | |
| enum class | donner::gpu::browser::BrowserObjectKind : uint8_t { Buffer , Texture , TextureView , Sampler , BindGroupLayout , BindGroup , PipelineLayout , ShaderModule , RenderPipeline , ComputePipeline , Surface , BufferMapping , kCount } |
| Kind of browser object a BrowserObjectId names. More... | |
Functions | |
| std::string_view | donner::gpu::browser::BrowserObjectKindName (BrowserObjectKind kind) |
Returns the name of kind, e.g. "buffer". Used in diagnostics. | |
| std::ostream & | donner::gpu::browser::operator<< (std::ostream &os, BrowserObjectKind value) |
| Ostream output operator. | |
Variables | |
| constexpr size_t | donner::gpu::browser::kBrowserObjectKindCount = static_cast<size_t>(BrowserObjectKind::kCount) |
| Number of BrowserObjectKind enumerators, for per-kind table sizing. | |
| constexpr BrowserObjectId | donner::gpu::browser::kNoBrowserObject = 0 |
| Identifier value that names no browser object. Every operation refuses it. | |
donner::gpu::browser::BrowserObjectTable - checked identifiers for browser-owned objects.
| using donner::gpu::browser::BrowserObjectId = uint32_t |
Identifier of one object the browser side owns.
Identifiers are minted in increasing order and never reused, so an identifier retained past its object's destruction names nothing rather than naming whatever was created next. That is the property slot indices alone cannot provide: the runtime recycles slots, so a stale slot index would eventually address a live object of the same kind.
|
strong |
Kind of browser object a BrowserObjectId names.
The kind travels with every identifier so the browser side can refuse an identifier that names a live object of the wrong kind, rather than calling a texture method on a buffer and surfacing whatever the browser makes of that.
| std::string_view donner::gpu::browser::BrowserObjectKindName | ( | BrowserObjectKind | kind | ) |
Returns the name of kind, e.g. "buffer". Used in diagnostics.
| kind | Kind to name. |
| std::ostream & donner::gpu::browser::operator<< | ( | std::ostream & | os, |
| BrowserObjectKind | value ) |
Ostream output operator.
| os | Output stream. |
| value | Value to output. |