play static method

void play(
  1. Canvas canvas,
  2. Uint8List ops,
  3. RemoteResources resources
)

Draws ops onto canvas, following references to other chunks. Images that have not arrived yet are skipped; the caller repaints once they do.

Implementation

static void play(Canvas canvas, Uint8List ops, RemoteResources resources) {
  final r = ByteReader(ops);
  final baseCount = canvas.getSaveCount();
  try {
    while (r.hasMore) {
      _step(canvas, r, resources);
    }
  } finally {
    canvas.restoreToCount(baseCount);
  }
}