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
In order to keep the element live, we need to keep buffering all commands which have been made to the 2D canvas. This allows re-composing the canvas buffer when the element's painting changes.
But this means you can have an infinitely growing display list which will tank perf in a way that might not be obvious to the author. There's a few ideas around it:
The browser detects when a command mutates the buffer such that all previous commands would be a no-op (clearRect for example). This could potentially also drop a subset of the commands, depending on the degree of optimization.
The browser could collapse commands into a texture so canvas has a stack of textures and placed elements.
The browser could dispatch an event forcing the author to redraw the canvas if the buffer has hit a limit