Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
RendererGeode.h File Reference

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

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

Classes

struct  donner::svg::FrameTimings
 Per-frame performance instrumentation for RendererGeode. 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.

See docs/design_docs/0017-geode_renderer.md for the full design.


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 beginFrameendFrame window. Counters are the durable CI signal; the GPU-timestamp fields are advisory and require enableTimestamps(true) + driver support (see GeodeDevice).

See docs/design_docs/0030-geode_performance.md for the target ceilings each optimization milestone drives these toward.

Collaboration diagram for donner::svg::FrameTimings:
[legend]
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.