Loading request...
Enable passing an existing buffer as an optional parameter to `canvas.toBuffer` to allow re-filling it on each invocation, reducing garbage collection pressure in tight render loops.
`toBuffer` is very handy for blitting a canvas into some other graphics system: ```javascript const buffer = canvas.toBuffer('raw') // blit buffer here ``` It would be really nice to pass in an existing buffer as an optional parameter, so it could be re-filled on each `toBuffer` invocation. That would cut down on gc pressure quite a bit, especially in a tight render loop.