3 ms·
But not necessarily more than strictly needed for avoiding tearing. If you can read current scanline and have per window swap chain (hardware layer), it might
by vardump 7y ago
But not necessarily more than strictly needed for avoiding tearing.
If you can read current scanline and have per window swap chain (hardware layer), it might be possible to completely avoid UI latency and tearing by drawing just before scanout. Apart from latency introduced by the display device itself.
Of course it might tear if the scanline chasing drawing thread is context switched away at a bad moment.
This technique is explained better at [0]. The point is mainly that you can combine this with GPU hardware multiple swap chains (layers).
This is never going to be a general solution, though. Just for some special cases where it's both possible to draw fast enough to chase current scanline. Also not all GPUs have multiple swap chains available per display.
[0]: https://www.blurbusters.com/blur-busters-lagless-raster-follower-algorithm-for-emulator-developers/ https://www.blurbusters.com/blur-busters-lagless-raster-foll...