rasterstream

command
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Command rasterstream is the live-verify probe for canvas.Raster streaming (#34) — the path a video player drives with SetPixels.

go run ./hack/rasterstream          # default painter (WebGPU on desktop)
go run -tags gl ./hack/rasterstream # GL painter

The left raster has NO Generator at all, exactly as the SetPixels documentation allows: under the old WebGPU painter it segfaulted on the first paint. The right one has a Generator as well, the workaround fyplayer adopted: it used to freeze on frame 1 because the texture was cached forever.

PASS: both squares animate a moving colour band and the frame counter climbs. FAIL: a crash on startup (issue 1), or a still image while the counter climbs (issue 2). Resize the window to confirm the texture is reallocated cleanly.

The third square carries the same frames at Translucency 0.5, which the WebGPU and software painters used to ignore entirely (#38).

-auto does those checks without a human: it captures the live canvas twice a few frames apart and reports, per raster, how many pixels changed inside that raster's own bounds (a frozen texture scores 0), then compares the opaque and translucent squares — identical colour means Translucency was dropped.

go run ./hack/rasterstream -auto

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL