Move LazySpan rows through one retained offset
This commit is contained in:
1 parent
0aa03cf621
commit
fffed42f9e
13 files changed
+503
-104
No files matched your search
@@ -94,6 +94,15 @@ resolved in the vertex shader.**
|
||||
- `mov(id, delta)` becomes: look up `id`'s slot, write
|
||||
`move_offsets[slot].delta += delta`. One write — no primitive touched, no
|
||||
recursion, since descendants already reference this slot transitively.
|
||||
- A container may also retain one optional **child-coordinate slot** between
|
||||
its own slot and every direct child's slot. `Painter::set_child_offset`
|
||||
creates that boundary before the first child is drawn and can update it
|
||||
after measuring a child on later redraws. The container's own primitives,
|
||||
hit region and mask stay fixed; its whole child subtree moves through one
|
||||
write and every existing GPU, hit-test and accessibility chain sees the
|
||||
same result. `LazySpan` uses this while still walking visible rows for
|
||||
virtualisation: row boxes stay in stable local coordinates and the shared
|
||||
boundary carries the changing screen translation.
|
||||
- `shader.wgsl`'s vertex stage, after computing `top_left`/`bot_right` in
|
||||
pixels (after `:106`, before the clip-space divide at `:113`), walks
|
||||
`move_idx → move_offsets[i].parent` for a bounded number of steps (a
|
||||
@@ -120,6 +129,12 @@ for a resize that changes a region's `rel` component (a genuine reflow,
|
||||
§3) and for a size-independent widget's resize (§3), where the content's
|
||||
shape doesn't change and one field write already suffices.
|
||||
|
||||
Provisional layout can still write an instance at an intermediate position
|
||||
and restore it before upload. `Primitives::set_instance` remembers the value
|
||||
at the first write in a frame and clears the dirty bit when the final bytes
|
||||
match it. The GPU therefore observes final layout state, not CPU-only
|
||||
measurement work.
|
||||
|
||||
### 2b. Two more readers of "where is this widget," and masks
|
||||
|
||||
Moving the offset into the vertex shader means `ActiveData.region` is no
|
||||
|
||||
Reference in new issue
Block a user