markPaintOrPresentComplete static method
Stop: paint or raster present completed for the paired echo generation.
Implementation
static void markPaintOrPresentComplete(int generation) {
if (!active) return;
final start = pendingStartUs;
final echoGen = pendingEchoGeneration;
if (start == null || echoGen == null) return;
if (generation < echoGen) return;
final stop = _nowUs();
final sample = TerminalScrollLatencySample(startUs: start, stopUs: stop);
samples.add(sample);
TerminalScrollTrace.log(
'latency',
'stop gen=$generation elapsedUs=${sample.elapsedUs}',
);
pendingStartUs = null;
pendingEchoGeneration = null;
}