Donner SVG main
0.8.0 · 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
RendererGeode.h File Reference

Geode GPU implementation of donner::svg::RendererInterface. More...

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
#include <vector>
#include "donner/base/Box.h"
#include "donner/base/Transform.h"
#include "donner/base/Utils.h"
#include "donner/gpu/Descriptors.h"
#include "donner/gpu/Handles.h"
#include "donner/gpu/TextureExport.h"
#include "donner/svg/SVGDocument.h"
#include "donner/svg/renderer/RendererInterface.h"
#include "donner/svg/renderer/geode/GeodeCounters.h"
#include "donner/svg/renderer/geode/GeodeGpuWait.h"
Include dependency graph for RendererGeode.h:

Classes

class  donner::svg::RendererGeodeTextureSnapshot
 GPU runtime 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 the Slug algorithm. More...
struct  donner::svg::RendererGeode::RetainedCompositeCounts
 Retained composite entries this renderer holds right now, per sequence. More...
struct  donner::svg::RendererGeode::TextShapeResidency
 Painted text shapes this renderer's device keeps for document, summed over its elements, and the cache bytes they charge. 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.

Enumerations

enum class  donner::svg::RendererGeodeTexturePoolTrim : uint8_t {
  donner::svg::IdleOnly ,
  donner::svg::ToFloor ,
  donner::svg::All
}
 How much RendererGeode::trimTexturePool frees. More...

Detailed Description

Geode GPU implementation of donner::svg::RendererInterface.

Geode uses native Metal on macOS, native Vulkan on Linux and the browser GPU runtime in WebAssembly, with the Slug algorithm for resolution-independent vector rasterization. It can create a headless device or render over a selected shared GPU root.


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 to endFrame window. Counters are the durable CI signal. GPU timestamps are not captured yet, so the GPU-timestamp fields are always zero.

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 Current upper bound for retained bytes. It follows the largest recent frame's working set, between a 64 MiB floor and maximumBudgetBytes.
uint64_t bytes = 0 Estimated GPU bytes retained by reusable textures.
uint64_t maximumBudgetBytes = 0 Most the budget can grow to: 256 MiB native, 96 MiB in WebAssembly builds.
size_t textureCount = 0 Number of reusable textures currently retained by the pool.

◆ donner::svg::RendererGeode::RetainedCompositeCounts

struct donner::svg::RendererGeode::RetainedCompositeCounts

Retained composite entries this renderer holds right now, per sequence.

Class Members
size_t filterResults = 0 Filter-result composite entries.
size_t images = 0 Blit entries of image textures kept across frames.
size_t layers = 0 Isolated-layer composite entries.
size_t masks = 0 Composite entries of <mask> contents through their masks.

◆ donner::svg::RendererGeode::TextShapeResidency

struct donner::svg::RendererGeode::TextShapeResidency

Painted text shapes this renderer's device keeps for document, summed over its elements, and the cache bytes they charge.

Class Members
uint64_t chargedBytes = 0 Bytes charged to the document's cache budget for them.
size_t shapes = 0 Retained shapes.