|
|
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.
|
WebGPU texture snapshot exported by RendererGeode. More...
#include "donner/svg/renderer/RendererGeode.h"
Public Member Functions | |
| RendererGeodeTextureSnapshot (std::shared_ptr< geode::GeodeDevice > device, wgpu::Texture texture, Vector2i dimensions, wgpu::TextureFormat format) | |
| Construct a Geode texture snapshot. | |
| RendererTextureSnapshotBackend | backend () const override |
| Renderer backend that produced this texture. | |
| Vector2i | dimensions () const override |
| Pixel dimensions of the texture in device pixels. | |
| AlphaType | alphaType () const override |
| Alpha interpretation of the texture contents. | |
| RendererBitmap | takeSnapshot () const override |
| Capture a CPU-readable copy of this texture. | |
| const wgpu::Texture & | texture () const |
| Resolved single-sample WebGPU texture. | |
| const wgpu::TextureView & | textureView () const |
| Lazily-created texture view suitable for ImGui_ImplWGPU's ImTextureID. | |
| wgpu::TextureFormat | format () const |
| WebGPU texture format. | |
WebGPU texture snapshot exported by RendererGeode.
The snapshot keeps the backing geode::GeodeDevice and texture alive so editor presentation code can sample the texture after the renderer has moved on to a later frame.
| donner::svg::RendererGeodeTextureSnapshot::RendererGeodeTextureSnapshot | ( | std::shared_ptr< geode::GeodeDevice > | device, |
| wgpu::Texture | texture, | ||
| Vector2i | dimensions, | ||
| wgpu::TextureFormat | format ) |
Construct a Geode texture snapshot.
| device | Shared Geode device that owns the WebGPU handle lifetime. |
| texture | Resolved single-sample texture containing the rendered frame. |
| dimensions | Texture dimensions in device pixels. |
| format | Texture format. |
|
inlinenodiscardoverridevirtual |
Alpha interpretation of the texture contents.
Implements donner::svg::RendererTextureSnapshot.
|
inlinenodiscardoverridevirtual |
Renderer backend that produced this texture.
Reimplemented from donner::svg::RendererTextureSnapshot.
|
inlinenodiscardoverridevirtual |
Pixel dimensions of the texture in device pixels.
Implements donner::svg::RendererTextureSnapshot.
|
nodiscardoverridevirtual |
Capture a CPU-readable copy of this texture.
Backends that cannot read texture snapshots return an empty bitmap. The operation may submit GPU work and block for completion, so presentation code should keep using the texture directly and reserve readback for explicit capture, diagnostics, and tests.
Reimplemented from donner::svg::RendererTextureSnapshot.