Optimize render loop scheduling on refresh rate changes
When the output refresh rate changes dynamically (e.g., 60Hz to 120Hz or vice versa), the RenderLoop now reschedules the next repaint to recalculate vblank intervals and safety margins. This prevents unnecessary blank frames during transitions, especially when switching from high to low refresh rates.
This optimization improves visual smoothness during mode switching on multi-monitor setups and VRR-capable displays.
Performance impact:
- Reduces frame misses during refresh rate transitions
- Eliminates unnecessary blank frame periods
- Maintains consistent vblank interval calculations
Tested on:
- 60Hz to 120Hz transitions
- Multi-monitor with mixed refresh rates
- VRR mode switches