Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
RendererGeode.h File Reference

Geode (WebGPU/Slug) implementation of donner::svg::RendererInterface. More...

#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <vector>
#include <webgpu/webgpu.hpp>
#include "donner/base/Box.h"
#include "donner/base/Transform.h"
#include "donner/gpu/Handles.h"
#include "donner/svg/SVGDocument.h"
#include "donner/svg/renderer/RendererInterface.h"
#include "donner/svg/renderer/geode/GeodeCounters.h"
#include "donner/svg/renderer/geode/GeodeWgpuUtil.h"
Include dependency graph for RendererGeode.h:

Classes

class  donner::svg::RendererGeodeTextureSnapshot
 WebGPU texture snapshot exported by RendererGeode. More...
struct  donner::svg::FrameTimings
 Per-frame performance instrumentation for RendererGeode. More...
struct  donner::svg::RendererGeodeTexturePoolStats
 Retained-memory instrumentation for RendererGeode's transient texture pool. More...
class  donner::svg::RendererGeode
 Geode rendering backend - GPU-native via WebGPU + the Slug algorithm. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
namespace  donner::svg
 Donner SVG library, which can load, manipulate and render SVG files.

Detailed Description

Geode (WebGPU/Slug) implementation of donner::svg::RendererInterface.

Geode is a GPU-native SVG rendering backend using WebGPU and the Slug algorithm for resolution-independent vector rasterization. It can run headless (creating its own device) or embedded inside a host application that provides an existing WebGPU device and render target.


Class Documentation

◆ donner::svg::FrameTimings

struct donner::svg::FrameTimings

Per-frame performance instrumentation for RendererGeode.

Returned by RendererGeode::lastFrameTimings(). Each field reports the cost of the most recent beginFrame→endFrame window. Counters are the durable CI signal; the GPU-timestamp fields are advisory and require enableTimestamps(true) + driver support (see GeodeDevice).

GeodePerf_tests.cc pins the steady-state ceilings these drive toward.

Class Members
GeodeCounters counters Counters for resource creation and command submission in the last frame. Available regardless of timestamp support.
uint64_t renderPassNs = 0 GPU render-pass duration in nanoseconds. Zero if timestamps are disabled or unsupported by the driver. Reserved for future work - currently always zero.
uint64_t totalGpuNs = 0 Total GPU work duration in nanoseconds (end of beginFrame's first submit to completion of endFrame's final submit). Zero if timestamps are disabled or unsupported. Reserved for future work - currently always zero.

◆ donner::svg::RendererGeodeTexturePoolStats

struct donner::svg::RendererGeodeTexturePoolStats

Retained-memory instrumentation for RendererGeode's transient texture pool.

Counts include only free textures available for cross-frame reuse, not textures currently in use by an active frame or the renderer's primary target.

Class Members
size_t bucketCount = 0 Number of non-empty exact-size texture buckets.
uint64_t budgetBytes = 0 Hard upper bound for retained bytes.
uint64_t bytes = 0 Estimated GPU bytes retained by reusable textures.
size_t textureCount = 0 Number of reusable textures currently retained by the pool.