3 ms·
That's a good point I totally forgot about. It actually means that most of the infrastructure for this is already around and implemented, but of course fundamen
by formerly_proven 6y ago
That's a good point I totally forgot about. It actually means that most of the infrastructure for this is already around and implemented, but of course fundamentally this is an information problem - the compositor gets told when applications "damaged" their output, but since there is no concept of presenting a frame in these legacy 2D APIs (GDI/+, X11 etc.), the compositor has no idea if the application will continuing "damaging" its output, or if it is "done for now".
I think the best a compositor might be able to do is something along the lines of keeping track of the latest possible time it has to start rendering such that the frame can be swapped to the front and sent to the screen. This should result in the lowest possible average latency while rendering at the vsync rate. DWM is clearly not doing this (since the delay is discretized to 16.7/33 ms), the Linux might be doing this, or it might be rendering on every damage event and use triple buffering, either would be plausibel given the 8 ms average delay.