docs/LAYOUT.md: masks reference a drawn primitive instead of copying a shape, and hit-testing applies the shape (Iris, 2026-09-07)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
232de0ec53
commit
1121d7cc83
3 files changed
+101
-40
No files matched your search
@@ -8,6 +8,43 @@ capability that moved. Small and trivial changes do not go here.
|
||||
An entry gives the date, what changed, why, and a short before/after where
|
||||
it helps judge the change without the session that made it. Newest first.
|
||||
|
||||
## 2026-09-07: a headless harness, replayed touch, and physical-pixel desktop layout
|
||||
|
||||
Layer 1 and 2 of docs/RUST.md's "Three test layers".
|
||||
|
||||
**New: `iris::harness`** -- a screen driven in-process with no window, no
|
||||
compositor and no GPU, on a clock the caller advances. `Harness::new(size,
|
||||
density)` gives you an `Rsc`, a `UiRenderState` and a state that
|
||||
implements `FocusHost`/`OpenUrl` by *recording* what the platform was
|
||||
asked for (`keyboard_shown`, `opened_urls`) rather than doing it;
|
||||
`frame(t_ms)`/`frames_until(..)` run frames, `touch(action, pos, t_ms)`
|
||||
feeds one pointer sample the way Android's `on_touch_event` does, and
|
||||
`replay(&TouchScript)` runs a whole recorded gesture. `TouchScript` parses
|
||||
a plain `t_ms action x y` file (`down`/`move`/`up`/`cancel`), so the
|
||||
batched 120Hz flick shape your phone actually delivers is a file that
|
||||
`cargo test` can replay -- something the emulator cannot produce at all.
|
||||
|
||||
**New: `List::fling_velocity() -> Option<f32>`**, what the release
|
||||
measured, readable where it landed rather than by re-timing the gesture.
|
||||
|
||||
**Changed: `List` starts a fling's curve at its first `tick_fling`, not
|
||||
at the release.** The only clock it reads is now the one its driver hands
|
||||
it; in a running app the difference is at most a frame.
|
||||
|
||||
**Changed: the desktop backend lays out in physical pixels with a
|
||||
density, exactly as Android does.** `iris::default::content_scale(window)`
|
||||
is the desktop's `content_scale` -- winit's scale factor, overridable with
|
||||
the `IRIS_SCALE` environment variable -- and it now feeds
|
||||
`UiRenderState::set_density`/`TextData::density` instead of dividing
|
||||
coordinates into a separate "logical" space. That division had
|
||||
`UiRenderState::resize` (physical) and the window uniform (logical)
|
||||
disagreeing on any display whose scale factor is not 1.0, and rasterised
|
||||
glyphs at one resolution to display them at another. `Input::event` lost
|
||||
its `scale_factor` parameter as a result, and `DefaultUiState::
|
||||
window_size()` now answers physical pixels. On a 1.0 display nothing
|
||||
changes. The override is what lets `run-headless.sh --phone` open a window
|
||||
at your phone's own 1080x2424 and 2.55.
|
||||
|
||||
## 2026-09-07: widgets can animate, and a fling finally moves
|
||||
|
||||
Iris's phone said "fling still doesn't work" twice. The velocity was only
|
||||
|
||||
Reference in new issue
Block a user