frame method
void
frame({})
Adds one frame that took paint in all, of which labels on labels:
place placing them and raster drawing their text, prep preparing
tiles and draw drawing the rest.
Implementation
void frame({
required int paint,
required int labels,
required int place,
required int raster,
required int prep,
required int draw,
required int unpack,
required String Function() describe,
}) {
frames++;
paintMicros += paint;
maxPaintMicros = math.max(maxPaintMicros, paint);
if (paint > 4000) paintsOver4ms++;
if (paint > 8000) paintsOver8ms++;
if (paint > 5000) {
if (slowPaints.length >= 300) slowPaints.removeAt(0);
slowPaints.add(describe());
}
labelMicros += labels;
maxLabelMicros = math.max(maxLabelMicros, labels);
placeMicros += place;
maxPlaceMicros = math.max(maxPlaceMicros, place);
labelRasterMicros += raster;
maxLabelRasterMicros = math.max(maxLabelRasterMicros, raster);
maxPrepMicros = math.max(maxPrepMicros, prep);
maxDrawMicros = math.max(maxDrawMicros, draw);
maxUnpackMicros = math.max(maxUnpackMicros, unpack);
}