Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::geode::GeodePathCacheComponent Struct Reference

Per-entity cache of Geode's encoded-path output (and strokeToFill result). Installed lazily by RendererGeode at the encode call sites via get_or_emplace; removed automatically when the source ComputedPathComponent updates or is destroyed. More...

#include "donner/svg/renderer/geode/GeodePathCacheComponent.h"

Classes

struct  StrokeSlot
 Stroke-slot cache. Holds both the Path::strokeToFill output path and its encoded form, keyed by the source StrokeStyle plus the device-derived curve-flattening tolerance. Invalidated whenever the fill slot is (geometry change, via the entt signal), on stroke-key mismatch (stroke width/dash/cap/ join change via CSS - the old key no longer matches the new one, so the next access regenerates), or on tolerance mismatch (the view scale crossed a flattening bucket). More...

Public Attributes

std::optional< EncodedPathfillEncode
 Fill-slot encode. Populated on first encode; reused on hit. Reset by the entt signal listener when geometry changes.
GeodeGeometryCacheReservation fillReservation
 Live retained-byte charge for fillEncode.
std::optional< StrokeSlotstrokeSlot
GeodeGeometryCacheReservation strokeReservation
 Live retained-byte charge for strokeSlot.

Detailed Description

Per-entity cache of Geode's encoded-path output (and strokeToFill result). Installed lazily by RendererGeode at the encode call sites via get_or_emplace; removed automatically when the source ComputedPathComponent updates or is destroyed.

Lives in donner::geode (not donner::svg::geode) to match the other Geode types (EncodedPath, LinearGradientParams, ...) that RendererGeode.cc references unqualified via geode:: inside the donner::svg namespace.

Member Data Documentation

◆ fillEncode

std::optional<EncodedPath> donner::geode::GeodePathCacheComponent::fillEncode

Fill-slot encode. Populated on first encode; reused on hit. Reset by the entt signal listener when geometry changes.

◆ fillReservation

GeodeGeometryCacheReservation donner::geode::GeodePathCacheComponent::fillReservation

Live retained-byte charge for fillEncode.

◆ strokeReservation

GeodeGeometryCacheReservation donner::geode::GeodePathCacheComponent::strokeReservation

Live retained-byte charge for strokeSlot.

◆ strokeSlot

std::optional<StrokeSlot> donner::geode::GeodePathCacheComponent::strokeSlot

The documentation for this struct was generated from the following file: