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. | |
| virtual RendererBitmap | takeSnapshotInterruptibly (const std::function< bool()> &shouldCancel) const |
| Capture CPU pixels while honoring cancellation before and after readback. GPU backends override this to poll cancellation throughout their bounded wait. | |
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.
|
inlinenodiscardvirtual |
Capture CPU pixels while honoring cancellation before and after readback. GPU backends override this to poll cancellation throughout their bounded wait.
| shouldCancel | Predicate returning true when the capture must be abandoned. |
Reimplemented in donner::svg::RendererGeodeTextureSnapshot.