|
|
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.
|
Backend-owned GPU texture snapshot produced by a renderer. More...
#include "donner/svg/renderer/RendererInterface.h"
Public Member Functions | |
| virtual RendererTextureSnapshotBackend | backend () const |
| Renderer backend that produced this texture. | |
| virtual Vector2i | dimensions () const =0 |
| Pixel dimensions of the texture in device pixels. | |
| virtual AlphaType | alphaType () const =0 |
| Alpha interpretation of the texture contents. | |
| virtual RendererBitmap | takeSnapshot () const |
| Capture a CPU-readable copy of this texture. | |
Backend-owned GPU texture snapshot produced by a renderer.
The base type is intentionally backend-neutral so compositor/editor code can carry texture payloads without depending on WebGPU, OpenGL, or any concrete graphics API. Backends that support direct texture presentation return a derived type from RendererInterface::takeTextureSnapshot().
|
nodiscardpure virtual |
Alpha interpretation of the texture contents.
Implemented in donner::svg::RendererGeodeTextureSnapshot.
|
inlinenodiscardvirtual |
Renderer backend that produced this texture.
Reimplemented in donner::svg::RendererGeodeTextureSnapshot.
|
nodiscardpure virtual |
Pixel dimensions of the texture in device pixels.
Implemented in donner::svg::RendererGeodeTextureSnapshot.
|
inlinenodiscardvirtual |
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 in donner::svg::RendererGeodeTextureSnapshot.