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.
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 "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...
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 beginFrame→endFrame 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.

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.