Record the PlaceDesc argument in the handoff
This commit is contained in:
1 parent
56437dc90f
commit
265ce6f829
1 file changed
+22
-16
+22
-16
@@ -6,11 +6,11 @@ in `docs/LAYOUT_LOG.md`.
|
|||||||
|
|
||||||
## The Iris layout repair is submitted
|
## The Iris layout repair is submitted
|
||||||
|
|
||||||
**Iris PR #19** (`layout/one-ask`) replaces closed #18. The tip is `c55be21`:
|
**Iris PR #19** (`layout/one-ask`) replaces closed #18. The tip is `58ce74d`:
|
||||||
`add6774` fixes collapsed-share placement, retained mask ownership and a
|
`add6774` fixes collapsed-share placement, retained mask ownership and a
|
||||||
redraw-on-reparent defect, `84dad21` removes repeated work in the test
|
redraw-on-reparent defect, `84dad21` removes repeated work in the test
|
||||||
harness, and `5642f20` through `c55be21` are the vocabulary and API
|
harness, and `5642f20` through `58ce74d` are the vocabulary and API work
|
||||||
work below.
|
below.
|
||||||
The core design remains sound; round-to-nearest is still unchanged.
|
The core design remains sound; round-to-nearest is still unchanged.
|
||||||
|
|
||||||
Two checkouts share one Git storage. `/home/bob/repos/iris` is the active
|
Two checkouts share one Git storage. `/home/bob/repos/iris` is the active
|
||||||
@@ -44,19 +44,25 @@ itself. Three names, and only two of them are boxes:
|
|||||||
`aeb60e5` also cut what a container has to say, since correctness and cost
|
`aeb60e5` also cut what a container has to say, since correctness and cost
|
||||||
had been paid for and ergonomics had not:
|
had been paid for and ergonomics had not:
|
||||||
|
|
||||||
- `Painter::widget_within(id, region)` takes a box in the widget's own
|
- **One argument says where a child goes.** `widget_at` and `place_at` take
|
||||||
coordinates and derives the child's rel base from it, so `Pad` and
|
`impl Into<PlaceDesc>`, so a wrapper passes a `UiRegion` and says nothing
|
||||||
`Offset` are one call each. `Offset` had been reading `region_len`, which
|
else -- `Pad` and `Offset` are one call each. `Place` and `Part` are gone:
|
||||||
pinned its drawing to a box length an offset does not depend on.
|
`Place` was a product written as a sum, and `Part`'s three cases named
|
||||||
- `Painter::place_at` takes the rel base, returns the answer, and draws the
|
operations the geometry already had (`UiSpan::within`, `UiSpan::shift`,
|
||||||
child where there is no answer to re-express. `Span`'s second pass is one
|
and `placement`'s own body).
|
||||||
call, and its `drawn_across` bookkeeping is gone.
|
- **`PlaceDescAxis` is named after the operation**: `within`, `shifted`,
|
||||||
- The rel base a container decides for a child is `narrow_rel_base`, and it
|
`sized`, `WHOLE`, with `fills` and `rel_base` as builders. The rel base a
|
||||||
takes `impl Into<Option<[Option<Len>; 2]>>`, so one that narrows nothing
|
caller does not state follows the constructor -- `within` narrows it,
|
||||||
writes `None`. The resolved value stays the bare `rel_base`.
|
`shifted` passes it through, `sized` is it -- which removes the one rule a
|
||||||
- `Part::All` is a `Part::WHOLE` constant rather than a variant. It was
|
caller could get wrong with nothing failing.
|
||||||
exactly `Of(UiSpan::FULL)`; measured at 0.07% of instructions retired
|
- **`PlaceDesc` is a proper pair**, with `x`/`y`, `axis`, `axis_mut` and
|
||||||
against 0.04% run-to-run noise on a 60-seed depth-5 shrink.
|
`from_axis` like every other pair here, so joint work is written once
|
||||||
|
rather than per axis.
|
||||||
|
- `Painter::place_at` returns the answer and draws the child where there is
|
||||||
|
no answer to re-express, so `Span`'s second pass is one call and its
|
||||||
|
`drawn_across` bookkeeping is gone.
|
||||||
|
- `widget_within` and `ActiveData::narrow_rel_base` are deleted; `asked` and
|
||||||
|
`placed` carry the rel base their ask stated.
|
||||||
|
|
||||||
Cold layout is byte-identical to `84dad21` across all of it, over 400
|
Cold layout is byte-identical to `84dad21` across all of it, over 400
|
||||||
depth-5 trees.
|
depth-5 trees.
|
||||||
|
|||||||
Reference in new issue
Block a user