Liveries panel: read sticker pictures off the UI thread #488

Manually merged
github merged 1 commit from github-bot/gh-488 into gh-pr/488/base 2026-11-27 18:46:56 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-27 18:34 UTC · original
holdmysocks:claude/livery-png-thread → master · +106 −8 · 2 files · 1 commits · merged 2026-11-27 18:45 UTC

What

Sticker pictures are read off the UI thread (SIX-251). A picture (a PNG file, or a game texture that is not in the cache yet) was read and resampled to its 1024 × 1024 layer on the UI thread the first time it was used, so a large PNG or a game livery with several stickers stopped the viewer while it loaded.

  • Each picture is read on a thread of its own. Until it is in, the sticker is drawn without it and the panel says "reading…" in place of its size; the view looks again every 30 ms while a picture is out.
  • A sticker that gets its first placement before its picture's shape is known is placed again when the picture is read, unless it was moved by hand in between.
  • "Read again" on a file drops a read that is still running, so the newer read counts.
  • Scripted steps (--livery-click, --livery-drag, --livery-save, ...) and a scripted screenshot wait for the pictures.

Checked

  • Same result as the v0.12.0 viewer, by scripted runs on the box truck with the same arguments, screenshots compared pixel by pixel (no pixel differs in any of the four):
    • three saved stickers opened from a file;
    • the same with the first picture replaced by an 8192 × 4096 PNG;
    • the game's dairy brand put on (six stickers);
    • a game sticker added and a wall panel clicked, then saved: the saved file is equal too (same zone, centre and size, the size in the picture's 4:1 shape).
  • cargo test -p sixng-gui: 59 pass. cargo build --release -p sixng-gui without warnings.

Not decoded / not done

  • That the viewer stays responsive while a picture is read was not watched by hand; the scripted runs show only that the result is the same.
  • Whether the scripted add ran through "placed again" or the picture was already in when the panel was clicked is not known; that path has no test of its own.
  • No limit on how many pictures are read at once (a livery shows at most 32).
  • Two other small items are not part of this: a sticker cannot run from one model onto another (the cab onto the box), since each model has its own unrelated UV layout; and the Metal renderer draws no stickers, which cannot be tried on this machine.
  • Screenshots are not attached (they show game assets); they were handed to the user directly.
**@⁠holdmysocks** on GitHub · 2026-11-27 18:34 UTC · [original](https://github.com/holdmysocks/SixNG/pull/488) `holdmysocks:claude/livery-png-thread` → `master` · +106 −8 · 2 files · 1 commits · merged 2026-11-27 18:45 UTC ## What Sticker pictures are read off the UI thread (SIX-251). A picture (a PNG file, or a game texture that is not in the cache yet) was read and resampled to its 1024 × 1024 layer on the UI thread the first time it was used, so a large PNG or a game livery with several stickers stopped the viewer while it loaded. - Each picture is read on a thread of its own. Until it is in, the sticker is drawn without it and the panel says "reading…" in place of its size; the view looks again every 30 ms while a picture is out. - A sticker that gets its first placement before its picture's shape is known is placed again when the picture is read, unless it was moved by hand in between. - "Read again" on a file drops a read that is still running, so the newer read counts. - Scripted steps (`--livery-click`, `--livery-drag`, `--livery-save`, ...) and a scripted screenshot wait for the pictures. ## Checked - Same result as the v0.12.0 viewer, by scripted runs on the box truck with the same arguments, screenshots compared pixel by pixel (no pixel differs in any of the four): - three saved stickers opened from a file; - the same with the first picture replaced by an 8192 × 4096 PNG; - the game's dairy brand put on (six stickers); - a game sticker added and a wall panel clicked, then saved: the saved file is equal too (same zone, centre and size, the size in the picture's 4:1 shape). - `cargo test -p sixng-gui`: 59 pass. `cargo build --release -p sixng-gui` without warnings. ## Not decoded / not done - That the viewer stays responsive while a picture is read was not watched by hand; the scripted runs show only that the result is the same. - Whether the scripted add ran through "placed again" or the picture was already in when the panel was clicked is not known; that path has no test of its own. - No limit on how many pictures are read at once (a livery shows at most 32). - Two other small items are not part of this: a sticker cannot run from one model onto another (the cab onto the box), since each model has its own unrelated UV layout; and the Metal renderer draws no stickers, which cannot be tried on this machine. - Screenshots are not attached (they show game assets); they were handed to the user directly.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:40:15 +00:00
github-bot changed target branch from master to gh-pr/488/base 2026-11-27 18:46:55 +00:00
github manually merged commit 48b24f68d7 into gh-pr/488/base 2026-11-27 18:46:55 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.