Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "Wayland-native Linux soundboard"
repository = "https://github.com/thewrz/HonkHonk"

[dependencies]
iced = { version = "0.14", features = ["tokio", "tiny-skia"] }
iced = { version = "0.14", features = ["tokio", "tiny-skia", "canvas"] }
# Wayland-only: disable default features on BOTH tray-icon and its (also-direct)
# muda dep to drop the `libxdo` X11 keystroke path. muda only uses libxdo for the
# predefined Copy/Cut/Paste/SelectAll items, which HonkHonk does not use (our tray
Expand Down
21 changes: 21 additions & 0 deletions docs/adr/009-canvas-sticker-tiles-rejected.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,24 @@ hold:

Bottom line: the 0.14 bump does not reopen the canvas-sticker-tile approach. The cache
lifecycle, scroll-clip, and text-overflow prerequisites in the Decision remain in force.

## Update: persistent-cache pattern proven (#131)

Decision step 4 ("prove a persistent `Cache` pattern at small scale") is done.
`src/ui/now_playing.rs` is the reference. The rule, for #13/#92:

1. The `canvas::Cache` lives in **persistent state** (a struct field), never
`Cache::new()` inside `view()`. Here `NowPlaying` owns it; the app holds one
`NowPlaying` field.
2. A **render key** captures everything the cached geometry depends on (here:
sound id + a *quantized* progress bucket). `NowPlaying::sync` clears the cache
**only** when the key changes — called once from `update()`, never `view()`.
3. Quantize continuous inputs (progress) into buckets so sub-pixel ticks do not
thrash the cache.
4. Draw cheap, frequently-moving elements (the playhead) as a **separate
per-frame overlay** that does not invalidate the cached geometry.

For the tile grid (#13): the grid's `Cache` belongs in app state keyed on the
filtered-sound set + density, cleared on filter/density change — not rebuilt per
`view()`. The text-overflow and tiny-skia scroll-clip lessons above still stand
and are out of scope for #131.
Loading
Loading