|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
Glyph-identity-keyed CPU encode + GPU residence for Geode text rendering. More...
#include <algorithm>#include <cstdint>#include <cstring>#include <limits>#include <memory>#include <optional>#include <unordered_map>#include <utility>#include <vector>#include "donner/base/Path.h"#include "donner/svg/renderer/geode/GeodePathEncoder.h"#include "donner/svg/renderer/geode/GeodeResidentPathComponent.h"Classes | |
| struct | donner::geode::GlyphGeometryKey |
| Identity of one unique glyph outline: every input that can change the encoded geometry, and nothing that cannot. More... | |
| struct | donner::geode::GlyphGeometryKeyHash |
| Hash for GlyphGeometryKey. Mixes with the 64-bit splitmix finalizer so the low-entropy fields (small glyph indices, a handful of scales) still spread across buckets. More... | |
| struct | donner::geode::GeodeGlyphResidentEntry |
| One unique glyph outline: the CPU outline, its analytic encode, and its GPU residence. More... | |
| class | donner::geode::GeodeGlyphCache |
| Document-scoped cache of unique glyph outlines and their GPU residence. More... | |
| struct | donner::geode::GeodeTextInstanceRecordComponent |
| Persistent per-occurrence instance records for one text element. More... | |
| struct | donner::geode::GeodeTextInstanceRecordComponent::Occurrence |
| One occurrence's record slot plus the bytes last written to it. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Glyph-identity-keyed CPU encode + GPU residence for Geode text rendering.
A text run draws the same handful of outlines over and over: the letter "e" in a paragraph is one outline placed at fifty positions. Encoding and uploading that outline once per occurrence per frame is the dominant cost of a text frame - the outline has to be fetched from the font backend, transformed into place, banded into analytic dual-ray data, and pushed to the GPU, every time.
This cache breaks the occurrence apart: everything that depends only on glyph identity (the outline, its encode, and its GPU residence) is kept once, and everything that depends on the occurrence (position, rotation, colour) rides in a per-occurrence instance record. A repeated glyph then costs one record instead of a re-encode plus a re-upload.
Lives in donner::geode (not donner::svg::geode) to match the other Geode types referenced unqualified via geode:: inside donner::svg.