Pace all frames to the frame rate, at best effort
CI / build (push) Successful in 32s

The pacer counted only its own frames, so the client's 30 came on top (60 gave
about 80), and it added no frames at all when the rate was out of reach. It now
asks for a window's next frame once the interval since its last frame began has
passed, and the client has had a third of a frame's time idle: all frames
within the rate, and as many as the client can draw when it can't reach it.

The engine's stats also break a frame's time down: sending to the renderer
process, bytes sent, buffer updates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-10-28 21:16:22 -07:00
1 parent 05a7be5d41
commit 399d934a08
6 files changed
+45 -18

No files matched your search

+4 -3
View File
@@ -6,9 +6,10 @@
// Graphics, FrameRate): 30, the client's own and the default, adds nothing; 60, 120, 240 or 360 add frames between
// ticks; 0 is uncapped.
//
// Drawing runs on the client's main thread, with its input and interface: extra frames are only asked for when they're
// affordable. A window gets one only once its last frame is drawn, and only if its frames take less than three
// quarters of the interval; uncapped, the client is left idle a third of a frame's time between frames.
// The rate counts all of a window's frames, the client's own included: a window is asked for one once its last frame
// is drawn and the interval since it began has passed. Drawing runs on the client's main thread, with its input and
// interface, so the client is also always left idle a third of a frame's time between frames: when the rate can't be
// reached, the client draws as many frames as that allows.
#include <windows.h>