Phone PNG benchmark
From the repository root:
python3 tools/client/png_benchmark/prepare.py
python3 tools/client/png_benchmark/serve.py
Open https://<server-address>:8444/ on the phone and tap Run benchmark. This is a
separate HTTPS server using the game's existing certificate. It does not start
or change the game server. Results go to local/png-benchmark/results/.
The existing local local/png-decoding/captured.json corpus is required; it
contains proprietary PNGs and original decoded pixels and is not committed.
The 180 distinct startup PNGs comprise 137 RGB and 43 RGBA images. The standalone
libpng wrapper uses the same port and transformations as
client/runtime/browser_png.c, with a memory reader instead of guest stream
calls. Browser paths include input copying, decoding, pixel readback and packing
to the same BGR/BGRA layout in WASM. WASM decoding writes its output directly
into WASM memory. This differs from the earlier desktop benchmark, which copied
WASM output into JavaScript and did not pack native output back to BGR/BGRA.
All downloads and input staging precede validation and one warm-up pass per decoder. Five measured passes rotate decoder order and alternate RGB/RGBA group order. Whole batches are timed, rather than individual images, to limit timer quantization. Correctness checks are outside measured passes. Unsupported native APIs are reported explicitly. Hiding the page stops and discards the run.
The benchmark runs in a dedicated worker, as game PNG decoding does. It measures elapsed decode-to-WASM time, not GPU upload, game startup or hardware utilization. A native speedup alone cannot establish whether hardware acceleration caused it.