Bounded reuse within one render preparation or font-refresh traversal. No entry survives the operation, and preparation changes invalidate both the graph and its target collections.
More...
#include "donner/svg/components/FontResourceGraph.h"
|
| struct | Stats |
| | Work and reuse counters for one cache lifetime. More...
|
|
|
static constexpr std::size_t | kMaximumWork = 32 * 1024 * 1024 |
| | New compute ceiling: 1024 passes over the existing 32 Ki parsed-child entity envelope.
|
Bounded reuse within one render preparation or font-refresh traversal. No entry survives the operation, and preparation changes invalidate both the graph and its target collections.
◆ donner::svg::components::FontResourceGraphCache::Stats
| struct donner::svg::components::FontResourceGraphCache::Stats |
Work and reuse counters for one cache lifetime.
| Class Members |
|
size_t |
cacheHits = 0 |
Target collections reused. |
|
size_t |
graphBuilds = 0 |
Dependency graphs constructed. |
|
bool |
resourceLimit = false |
True after the work ceiling is exhausted. |
|
size_t |
targetCollections = 0 |
Target traversals computed. |
|
size_t |
work = 0 |
Charged units against the cache work ceiling. |
◆ FontResourceGraphCache()
| donner::svg::components::FontResourceGraphCache::FontResourceGraphCache |
( |
Stats * | stats = nullptr | ) |
|
|
inlineexplicit |
Create a cache using caller-owned counters or internal counters.
- Parameters
-
| stats | Optional counters that must outlive the cache. |
◆ collect()
Collect a target's font dependencies, reusing valid evidence within this cache lifetime.
- Parameters
-
| document | Document containing the target. |
| target | Entity whose dependency closure is requested. |
| purpose | Whether to use full prepared or completed rendered-frame evidence. |
- Returns
- Dependencies and render/limit state for the target.
◆ finishRefresh()
| void donner::svg::components::FontResourceGraphCache::finishRefresh |
( |
const SVGDocumentHandle & | document, |
|
|
std::span< const Entity > | changedOwners ) |
Invalidate consumers of changed geometry and refresh retained font metadata.
- Parameters
-
| document | Document whose font resources were refreshed. |
| changedOwners | Geometry owners whose dependents may need repainting. |
◆ preserveBeforeRefresh()
| void donner::svg::components::FontResourceGraphCache::preserveBeforeRefresh |
( |
const SVGDocumentHandle & | document | ) |
|
Snapshot dependency evidence before a font-resource refresh changes geometry.
- Parameters
-
| document | Document whose prepared graph should be retained for invalidation. |
The documentation for this class was generated from the following file: