record method
void
record({
- required Duration renderDuration,
- required DegradationLevel degradationLevel,
- int? width,
- int? height,
Records a render frame.
Implementation
void record({
required Duration renderDuration,
required DegradationLevel degradationLevel,
int? width,
int? height,
}) {
final us = renderDuration.inMicroseconds;
_frameCount++;
_totalRenderUs += us;
_lastRenderUs = us;
if (_frameCount == 1) {
_minRenderUs = us;
_maxRenderUs = us;
} else {
if (us < _minRenderUs) _minRenderUs = us;
if (us > _maxRenderUs) _maxRenderUs = us;
}
_lastDegradation = degradationLevel;
_lastWidth = width;
_lastHeight = height;
}