perf: reduce-motion on the GL/software renderer tiers

On weak GPUs every animation frame is a full-window femtovg repaint, so
continuously-animated loading indicators dominate transient CPU (opening
the search cortinilla spiked to ~40% on a 2014 Mac Mini). New
ShellState.reduce-motion (seeded true on non-wgpu tiers, like the shader
gate) switches those animations from display-rate animation-tick to a
shared ~8fps coarse clock advanced by ONE timer in AppShell — same phase
math, 60 -> 8 repaints per second:

- LoadingSpinner / LoadingDots (all mount sites inherit)
- Equalizer bars (TrackPlayCell + immersive track info)
- Fetch/download spinners (TrackPlayCell x2, TrackRow, offline manager)
- Both search-cortinilla skeleton pulses (the reported spike)
- Home skeleton: the 900ms opacity fade collapses to a snap (its phase
  timer becomes the only driver, ~1fps while mounted)

Also logs the window scale factor at startup (circle-AA investigation:
femtovg's fringe AA halves at fractional scale factors, dpi=ceil(scale)).

cc
This commit is contained in:
vicrodh committed 2026-07-01 20:55:09 -06:00
1 parent b3f607fcf0
commit d9b82e7b12
12 files changed
+106 -27

No files matched your search

+8
View File
@@ -3623,6 +3623,14 @@ export global LocationViewActions {
// Globals are imported directly by the shell components, so toggles
// need no callback plumbing.
export global ShellState {
// --- Reduce motion (weak renderer tiers) -------------------------------
// Seeded from Rust: true on the femtovg-GL / software tiers, where every
// animation frame is a full-window repaint on a weak GPU. When set,
// loading indicators / eq bars step at ~8fps from `coarse-tick-ms`
// (advanced by one Timer in AppShell) instead of the display-rate
// animation-tick(). Same phase math, 60fps -> 8fps repaints.
in-out property <bool> reduce-motion: false;
in-out property <int> coarse-tick-ms: 0;
// Three-state sidebar: 0 = open (240px, labels), 1 = mini (64px, icons
// only, Tauri-style), 2 = closed (0px). The collapse toggle cycles
// open -> mini -> closed -> open.