measureDrawingPerformance static method
void
measureDrawingPerformance(})
Performance monitoring for web
Implementation
static void measureDrawingPerformance(
Canvas canvas,
Drawable drawable,
Paint pathPaint,
Paint fillPaint,
{String? label}
) {
if (isWeb) {
final stopwatch = Stopwatch()..start();
canvas.drawRoughOptimized(drawable, pathPaint, fillPaint);
stopwatch.stop();
if (kDebugMode) {
print('${label ?? 'Drawing'} took ${stopwatch.elapsedMicroseconds}μs');
}
} else {
// Use standard Rough extension for non-web platforms
canvas.drawRough(drawable, pathPaint, fillPaint);
}
}