TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::UICacheManager::Scope Struct Reference

Only what's needed to decide whether a scope is still clean and to blit it; not the element tree. More...

#include <gui_controls/subsystems/gui_ui_cache_subsystem.h>

Public Attributes

std::unordered_set< ID > scopeIDs
 every element id in the subtree (membership tests)
std::vector< std::pair< ID, int2 > > scrollSnapshot
 Scroll offsets of scroll containers in the scope at capture time.
std::unordered_set< ID > textEditorIds
 Text-editor element ids in the scope (recorded at capture).
std::vector< ID > claimedSwatches
 Swatch color-style ids claimed while building the scope; kept alive on hit frames.
ID snapHover = ID::Invalid()
 Hovered element at capture time when it is in the scope, else Invalid; the other snap* fields work the same for active, focus and capture.
ID snapActive = ID::Invalid()
ID snapFocus = ID::Invalid()
ID snapCapture = ID::Invalid()
uint64_t signature = 0
 data signature of the last build
ElementRef lastContainerRef = ElementRef::Invalid()
 refreshed every frame in BeginCached
int2 cachedSize {}
 container inner size at capture
IntRect cachedContentBounds {}
 the built content's bounds, restored on clean frames
bool hasCachedSize = false
bool usesPostLayout = false
 The subtree uses AddPostLayout, so it needs the deferred-measurement settle.
bool captured = false
 a snapshot exists
bool nonCacheable = false
 the subtree has a window; always rebuilds
bool dirty = false
 forced rebuild (Invalidate / size change / propagation)
bool missedThisFrame = false
 rebuilt (not replayed) this frame
uint64_t firstCaptureFrame = 0
 frame of first capture (for the deferred-measurement settle)
ID parentScopeID = ID::Invalid()
 enclosing cached scope (for invalidation propagation)
uint64_t themeEpoch = 0
 global epoch at capture; a newer one rebuilds
uint64_t lastUsedFrame = 0
 last frame BeginCached reached it, for eviction
int2 drawCapturePos = {}
 Draw cache: the container's window-local position when its primitives were captured, used to translate the blit to its current position.

Detailed Description

Only what's needed to decide whether a scope is still clean and to blit it; not the element tree.

Member Data Documentation

◆ scopeIDs

std::unordered_set<ID> tachyon::UICacheManager::Scope::scopeIDs

every element id in the subtree (membership tests)

◆ scrollSnapshot

std::vector<std::pair<ID, int2> > tachyon::UICacheManager::Scope::scrollSnapshot

Scroll offsets of scroll containers in the scope at capture time.

A change (wheel/drag scroll) invalidates the cache so virtual content re-emits its visible rows - scroll isn't an interaction-state change.

◆ textEditorIds

std::unordered_set<ID> tachyon::UICacheManager::Scope::textEditorIds

Text-editor element ids in the scope (recorded at capture).

A scope with a focused editor rebuilds every frame so the editor's editable-text registration (typing, caret) re-runs.

◆ claimedSwatches

std::vector<ID> tachyon::UICacheManager::Scope::claimedSwatches

Swatch color-style ids claimed while building the scope; kept alive on hit frames.

◆ snapHover

ID tachyon::UICacheManager::Scope::snapHover = ID::Invalid()

Hovered element at capture time when it is in the scope, else Invalid; the other snap* fields work the same for active, focus and capture.

◆ snapActive

ID tachyon::UICacheManager::Scope::snapActive = ID::Invalid()

◆ snapFocus

ID tachyon::UICacheManager::Scope::snapFocus = ID::Invalid()

◆ snapCapture

ID tachyon::UICacheManager::Scope::snapCapture = ID::Invalid()

◆ signature

uint64_t tachyon::UICacheManager::Scope::signature = 0

data signature of the last build

◆ lastContainerRef

ElementRef tachyon::UICacheManager::Scope::lastContainerRef = ElementRef::Invalid()

refreshed every frame in BeginCached

◆ cachedSize

int2 tachyon::UICacheManager::Scope::cachedSize {}

container inner size at capture

◆ cachedContentBounds

IntRect tachyon::UICacheManager::Scope::cachedContentBounds {}

the built content's bounds, restored on clean frames

◆ hasCachedSize

bool tachyon::UICacheManager::Scope::hasCachedSize = false

◆ usesPostLayout

bool tachyon::UICacheManager::Scope::usesPostLayout = false

The subtree uses AddPostLayout, so it needs the deferred-measurement settle.

◆ captured

bool tachyon::UICacheManager::Scope::captured = false

a snapshot exists

◆ nonCacheable

bool tachyon::UICacheManager::Scope::nonCacheable = false

the subtree has a window; always rebuilds

◆ dirty

bool tachyon::UICacheManager::Scope::dirty = false

forced rebuild (Invalidate / size change / propagation)

◆ missedThisFrame

bool tachyon::UICacheManager::Scope::missedThisFrame = false

rebuilt (not replayed) this frame

◆ firstCaptureFrame

uint64_t tachyon::UICacheManager::Scope::firstCaptureFrame = 0

frame of first capture (for the deferred-measurement settle)

◆ parentScopeID

ID tachyon::UICacheManager::Scope::parentScopeID = ID::Invalid()

enclosing cached scope (for invalidation propagation)

◆ themeEpoch

uint64_t tachyon::UICacheManager::Scope::themeEpoch = 0

global epoch at capture; a newer one rebuilds

◆ lastUsedFrame

uint64_t tachyon::UICacheManager::Scope::lastUsedFrame = 0

last frame BeginCached reached it, for eviction

◆ drawCapturePos

int2 tachyon::UICacheManager::Scope::drawCapturePos = {}

Draw cache: the container's window-local position when its primitives were captured, used to translate the blit to its current position.


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