Skip to content

Suspend GPU rendering while minimized - #98

Merged
teloverge merged 8 commits into
mainfrom
codex/suspend-gpu-when-minimized
Aug 9, 2026
Merged

Suspend GPU rendering while minimized#98
teloverge merged 8 commits into
mainfrom
codex/suspend-gpu-when-minimized

Conversation

@teloverge

Copy link
Copy Markdown
Owner

What changed

  • stop the star-map RAF loop and resize paints while minimized or hidden
  • preserve renderer state and animation phase across suspension
  • observe Tauri minimized state and browser document visibility with cleanup and fail-open behavior
  • retain the existing five-minute native background polling cadence
  • add lifecycle regressions and an Unreleased changelog entry

Why

Stellr's canvas renderer continuously scheduled GPU-backed frames even when the application was minimized. Background data synchronization should continue sparsely, but invisible visual work should stop.

Impact

Minimized native windows and hidden browser documents no longer render canvas frames. Restoring resumes the same map immediately without remounting or resetting camera, selection, model, flare, ticker, or animation phase.

Root cause

The star-map render loop owned an unconditional requestAnimationFrame chain, while window visibility/minimized state was not connected to the renderer lifecycle.

Validation

  • vpr.exe test - 30 files and 236 tests passed
  • vpr.exe check - 0 errors and 0 warnings
  • vpr.exe build
  • cargo.exe fmt --all -- --check
  • cargo.exe clippy --workspace --all-targets --locked -- -D warnings
  • cargo.exe test --workspace --locked -- --test-threads=1

@teloverge
teloverge marked this pull request as ready for review August 9, 2026 21:19
@teloverge
teloverge merged commit 1d5fedf into main Aug 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant