class
Tessell::UI::Pool
- Tessell::UI::Pool
- Reference
- Object
Overview
Reusable state for apply. Reuse the same instance across frames so that steady-state (no structural/value changes, buffers pre-sized) allocates 0.
Defined in:
tessell/ui/apply.crConstructors
Instance Method Summary
- #activated : Array(UiKey)
- #active : Array(UiKey)
- #active_index : Hash(UiKey, Int32)
- #add_active(key : UiKey) : Nil
- #desired : Hash(UiKey, Array(UiKey))
-
#desired_for(key : UiKey, g : UInt32) : Array(UiKey) | Nil
Desired buffer only if touched this gen, else nil (treated as empty).
- #dmark : Hash(UiKey, UInt32)
- #gen : UInt32
- #gen=(gen : UInt32)
- #map : Hash(UiKey, Node)
- #meta : Hash(UiKey, Meta)
- #remove_active(key : UiKey) : Nil
- #remove_buf : Array(UiKey)
-
#seen_keys : Set(UiKey)
重复 key 预检集合(issue #43):同帧两组件共用 UiKey 会让节点父链成环, 任何沿 parent 上溯的遍历(component_for_node/HitTest/a11y)无限挂死。 apply 在任何变更前 fail-fast(Set#clear 保留容量,稳态零分配)。
-
#touch_desired(key : UiKey, g : UInt32) : Array(UiKey)
Desired-children buffer for parent key in current gen (cleared on first touch).
Constructor Detail
Instance Method Detail
Desired buffer only if touched this gen, else nil (treated as empty).
重复 key 预检集合(issue #43):同帧两组件共用 UiKey 会让节点父链成环, 任何沿 parent 上溯的遍历(component_for_node/HitTest/a11y)无限挂死。 apply 在任何变更前 fail-fast(Set#clear 保留容量,稳态零分配)。
Desired-children buffer for parent key in current gen (cleared on first touch).