|
| | UICacheManager (FramePipeline &frame, ElementStorage &storage, GUIStateManager &stateManager) |
| Scope & | GetOrCreate (ID id) |
| | The scope with id, created on first use.
|
| Scope * | Find (ID id) |
| | The scope with id, or nullptr.
|
| bool | EvaluateHit (const Scope &s, uint64_t signature, const HitInput &input) const |
| | True when scope s, built with data signature, can be served from cache this frame.
|
| void | Invalidate (ID id) |
| | Rebuilds scope id the next time it is reached, and its enclosing scopes (an outer hit skips inner content too).
|
| void | InvalidateAll () |
| | Bumps the global epoch so every scope rebuilds (theme reload, display scale change).
|
| uint64_t | CurrentFrame () const |
| | Frame counter, advanced once per frame.
|
| uint64_t | ThemeEpoch () const |
| | Global epoch that InvalidateAll() bumps.
|
| void | SetDrawCacheEnabled (bool e) |
| | When off, EvaluateHit always misses and every scope rebuilds (for A/B comparison).
|
| bool | IsDrawCacheEnabled () const |
| void | RecordResult (bool hit) |
| | Counts a scope served from cache (hit) or rebuilt.
|
| void | RecordDrawReplay () |
| | a scope's draw blitted from cache
|
| void | RecordDrawCapture () |
| | a scope's draw (re)captured this frame
|
| uint32_t | FrameHits () const |
| uint32_t | FrameMisses () const |
| uint32_t | FrameDrawReplays () const |
| uint32_t | FrameDrawCaptures () const |
| size_t | ScopeCount () const |
Retained-render cache for BeginCached/EndCached scopes.
On a frame where nothing relevant changed, the scope's body is skipped and OnRender blits the primitives captured when it was last rendered.
This subsystem owns the per-scope state and the invalidation policy; the draw capture/blit lives in GUIApplication::OnRender. A scope rebuilds when:
- its container's allotted (inner) size changed (auto, OnPostLayout)
- hover/active/focus/capture crossed its element set (auto, EvaluateHit)
- Invalidate(id) was called, or an ancestor scope was (explicit)
- the optional data signature changed
- the theme was reloaded (global epoch)