Record the resize change, and why the position chain moved up
This commit is contained in:
1 parent
0aaa1f92db
commit
270fe66802
1 file changed
+21
-10
@@ -9,14 +9,15 @@ Canonical `main` is **`43ce8c7`** (#12, pointer routing). Fourteen slices are
|
|||||||
in.
|
in.
|
||||||
|
|
||||||
- **#16** `split/16-draw-size`, worktree `/home/bob/repos/iris-pr16`, head
|
- **#16** `split/16-draw-size`, worktree `/home/bob/repos/iris-pr16`, head
|
||||||
`9520996`. A widget sizes itself while drawing; `SizeCtx`, the `desired_*`
|
`984f482`. A widget sizes itself while drawing; `SizeCtx`, the `desired_*`
|
||||||
methods and the size cache are gone, and `on_resize(axis)` drives the
|
methods and the size cache are gone, and `on_resize(axis)` drives the
|
||||||
retained path. One review round answered: `Widget::draw` returns the `Size`
|
retained path. Two review rounds answered: `Widget::draw` returns the `Size`
|
||||||
(no `Painter::set_size`), both `place` methods are folded back into
|
(no `Painter::set_size`), both `place` methods are folded back into
|
||||||
`widget_within`/`draw_inner`, `Painter::size_hint` records the size
|
`widget_within`/`draw_inner`, `Painter::size_hint` records the size
|
||||||
dependency `place` used to, and `()` sizes itself rest so it is a gap.
|
dependency `place` used to, `()` sizes itself rest so it is a gap, and a
|
||||||
`tabs` (all five tabs, and a replay that adds two images), `view` and
|
resize now moves the drawing instead of wiping the tree. `tabs` (all five
|
||||||
`minimal` render byte-identical to `upstream/main`.
|
tabs, and a replay that adds two images), `view` and `minimal` render
|
||||||
|
byte-identical to `upstream/main`.
|
||||||
- **#17** `split/17-headless-rig`, worktree `/home/bob/repos/iris-pr17`, head
|
- **#17** `split/17-headless-rig`, worktree `/home/bob/repos/iris-pr17`, head
|
||||||
`deb9c1b`. The compositor script, `rig-input`'s `replay-touch` and the
|
`deb9c1b`. The compositor script, `rig-input`'s `replay-touch` and the
|
||||||
`.touch` parser, so a rendering claim no longer has to be checked from
|
`.touch` parser, so a rendering claim no longer has to be checked from
|
||||||
@@ -25,11 +26,21 @@ in.
|
|||||||
disjoint from #16.
|
disjoint from #16.
|
||||||
|
|
||||||
**Waiting on the owner:** whether size dependencies should be recorded per
|
**Waiting on the owner:** whether size dependencies should be recorded per
|
||||||
axis. They could be, but `highest_reader`'s only trigger is `needs_redraw`,
|
axis. They could be, but `mark_readers`' only trigger is `needs_redraw`, which
|
||||||
which carries no axis, so the precision would be unusable until the trigger
|
carries no axis, so the precision would be unusable until the trigger changes:
|
||||||
changes: redraw a child first, compare its new size to the old, and propagate
|
redraw a child first, compare its new size to the old, and propagate only to
|
||||||
only to readers of the axes that moved. Offered on #16 as its own slice, ahead
|
readers of the axes that moved. Offered on #16 as its own slice, ahead of the
|
||||||
of the position chain.
|
position chain.
|
||||||
|
|
||||||
|
**What the resize change taught, and why the chain moved up.** `mov` cannot
|
||||||
|
stretch a drawing out of a box with no relative extent: `UiScalar::within` puts
|
||||||
|
a part into such a box as a plain offset from its start, so the part's own
|
||||||
|
fraction is gone, and `outside` asks `lerp_inv` to invert a zero-length range --
|
||||||
|
where `div_or`'s fallback returns a rel of 0 rather than saying it cannot. The
|
||||||
|
remap then silently leaves the drawing its old size. #16 makes `OnResize::Scale`
|
||||||
|
refuse that case, which costs a redraw of any fixed-size subtree whose box later
|
||||||
|
changes length. Separating the drawn box from the offered one is what removes
|
||||||
|
the cost, so the position chain now sits directly after built-in alignment.
|
||||||
|
|
||||||
Check for a review before starting anything, and read the newest
|
Check for a review before starting anything, and read the newest
|
||||||
`submitted_at` rather than the first result:
|
`submitted_at` rather than the first result:
|
||||||
|
|||||||
Reference in new issue
Block a user