Skip to Content
Skia Wasm

Performance

How Skia Wasm compares with canvaskit-wasm, in time per frame and in download size.

Time per frame

Four scenes, each drawn by canvaskit-wasm 0.41.1 (the "full" build, which React Native Skia draws with on the web: Ganesh on WebGL 2) and by Skia Wasm (Graphite on WebGPU). Every item is animated on every frame, with the same arithmetic in both. The figures are milliseconds of main thread per frame, on an M5 Max in Chrome 158.

Scenecanvaskit-wasmSkia Wasm
10,000 rounded rects6.395.681.1x faster
1,000 rects with a runtime shader2.110.782.7x faster
200 animated paths1.080.422.6x faster
2,000 images1.501.53Same

On a phone (a Galaxy S25 Edge, kept hot so that its cores stay at the same limit), the ranking is the same, and the 10,000 rects run at 58 frames per second against 55 for canvaskit-wasm.

Both draw the same pixels: identical for Skia Wasm from one build to the next, and within a few levels out of 255 between the two libraries.

Why it is fast

Most of the cost of a frame of small items is in sending them to the GPU, not in the calls that describe them. Skia Wasm links a build of Skia where Graphite uses two features of WebGPU that its Dawn backend turns off in wasm builds:

  • Storage buffers. The uniforms of every draw go into one buffer that the shader indexes per instance, so draws that share a pipeline become one instanced draw: 10,000 rounded rects are 10 draws instead of 10,000. Every browser with WebGPU has them.
  • Immediates. Graphite's 32 bytes of per-pass data are given to the render pass directly instead of through a bind group, which lets it reuse its bind groups instead of creating one per draw. Chrome has them from version 149. Elsewhere, storage buffers alone give most of the gain.

Nothing needs to be requested: a device made with requestDevice() and no options has both where the browser does.

The calls themselves are plain C exports with thin wrappers, no embind: on the phone at full clock speed, describing the 200 paths takes 0.4 ms against 1.3 ms for canvaskit-wasm.

Download size

The wasm and the JavaScript that loads it:

RawgzipBrotli
canvaskit-wasm, full7.83 MB3.13 MB2.42 MB
canvaskit-wasm, default6.95 MB2.80 MB2.17 MB
Skia Wasm6.41 MB2.30 MB1.71 MB

Skia Wasm includes paragraphs with HarfBuzz shaping, PNG, JPEG and WebP encoding, Skottie and SVG documents.

What it does not measure

  • The main thread only, plus the frame rate. The time the GPU spends is not timed.
  • Four synthetic scenes of thousands of small items, chosen to stress the bindings. A scene of a few large draws shows less of a difference.
  • One laptop and one phone, in Chrome.

The method, every figure and the raw results are in BENCHMARK.md.

On this page