rasterizeHeadlessInto

fun rasterizeHeadlessInto(commands: List<DrawCommand>, bounds: IntRect, scale: Int, pixels: IntArray)(source)

Rasterizes an original-coordinate region into borrowed caller-owned ARGB storage for synchronous native upload. Materializes the transparent background lazily and writes only the checked physical region prefix; excess capacity remains untouched. Every output pixel is initialized before use, including empty commands and clipped primitives. The caller exclusively owns pixels throughout this call, and no image, command, array or callback is retained. Preflight rejects invalid input before any storage changes. Pixel arithmetic follows rasterizeHeadlessRegion.