You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
toBuffer is very handy for blitting a canvas into some other graphics system:
constbuffer=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.
The text was updated successfully, but these errors were encountered:
mreinstein
changed the title
passing an buffer object to canvas.toBuffer to reduce gc thrash
passing a buffer object to canvas.toBuffer to reduce gc thrash
Feb 26, 2024
toBuffer
is very handy for blitting a canvas into some other graphics system: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.
The text was updated successfully, but these errors were encountered: