warmUpOnCanvas method Null safety

  1. @protected
Future<void> warmUpOnCanvas(
  1. Canvas canvas
)

Trigger draw operations on a given canvas to warm up GPU shader compilation cache.

To decide which draw operations to be added to your custom warm up process, consider capturing an skp using flutter screenshot --observatory-uri=<uri> --type=skia and analyzing it with debugger.skia.org/. Alternatively, one may run the app with flutter run --trace-skia and then examine the raster thread in the observatory timeline to see which Skia draw operations are commonly used, and which shader compilations are causing jank.

Implementation

@protected
Future<void> warmUpOnCanvas(ui.Canvas canvas);