Studio: FPS counter with semaphore circle and configurable thresholds
Goal
Add a persistent FPS counter to the Studio that continues counting frames even when the UI is not being redrawn (idle state). Currently, the FPS counter freezes when the user stops moving the mouse or no UI elements change.
Include a semaphore circle indicator:
- Green when FPS >= 60 (smooth)
- Yellow when FPS >= 30 (acceptable)
- Red when FPS < 30 (stuttering)
Use the Settings API to allow users to customize these thresholds.
Context / integration points
- The current FPS counter only updates on redraws, which means it stalls during idle periods.
- The Studio needs a background timer or separate counter that samples frame time independently of UI redraw frequency.
- Settings API (#9 (closed)) should host the threshold configuration.
- The semaphore circle should be visible in the status bar or a corner overlay.
Design
- Maintain a separate frame counter that increments on each present/swap, regardless of UI redraw.
- Sample FPS every 500ms (configurable) and display the rolling average.
- Semaphore circle: filled circle with color based on current FPS relative to thresholds.
- Default thresholds: green >= 60, yellow >= 30, red < 30.
- Expose thresholds in Settings: , , .
- Display format: "FPS: 60" with the colored circle next to it.
- Place in the status bar (bottom of the Studio window).
Tasks
- Implement a frame counter that tracks presents independent of UI redraws
- Implement rolling average FPS calculation
- Add semaphore circle widget (green/yellow/red)
- Add FPS display to the status bar
- Add threshold settings to the Settings API / Settings panel
- Test FPS counter behavior during idle periods
Acceptance criteria
- FPS counter updates consistently, even when the UI is idle (no mouse movement, no redraws).
- Semaphore circle changes color at the configured thresholds.
- Thresholds are customizable via Settings and persist.
- The display is non-intrusive and professional-looking.
Dependencies
Settings API (#9 (closed)).
Out of scope
- GPU performance metrics (VRAM, draw calls).
- FPS graph / history chart.