You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FPS indicator wakes up the renderer continuously when idle #23204
When DebugSettings.EnableFrameRateCounter is on and the app stops rendering, the FPS diagnostic panel is meant to do a single final redraw (showing "Idle" with the tinted background) and then go quiet. In practice the numeric values keep updating every couple of seconds, indicating the panel itself is waking the renderer continuously.
Expected behavior
After ~2 seconds of no external rendering, the panel should switch to the "Idle" state once and stay frozen there. No further wake-ups should occur until external activity resumes.
Root cause
Two compounding bugs in FpsHelper (src/Uno.UI/Helpers/SkiaRenderHelper.skia.cs):
Bug A — first-idle-tick RequestRedraw sabotages idle detection. In the noNewFrames branch of TimerTick, a RequestRedraw?.Invoke() fired on every first idle tick. The resulting render flows through OnFrameRecorded, which bumps _currentFrameGeneration. The next tick observes the new generation, decides noNewFrames = false, and resets _consecutiveIdleTicks = 0. The counter never reaches 2, so true idle is never reached and the panel oscillates. (This line was a leftover from the original idle-indicator commit, where it was needed before the >= 2 early-return path was introduced.)
Bug B — final idle redraw restarts the 1 Hz timer via BeginFrame. Even with Bug A fixed, the legitimate final idle redraw triggers a render that flows through Draw() -> RenderPicture() -> BeginFrame(). BeginFrame blindly restarts the timer because !_timerRunning. The next tick (immediate TimeSpan.Zero fire) sees the just-recorded idle frame's bumped generation, clears _isIdle, and the cycle restarts every 2-3 seconds.
Activity
fix: Stop FPS indicator from waking renderer when idle (fixes unoplat…