4 ms·
> Let's make sad tabs happy again! In the event that a client runs out of GPU memory or some other disaster befalls your canvas, you can now receive a callback
by londons_explore 5y ago
> Let's make sad tabs happy again! In the event that a client runs out of GPU memory or some other disaster befalls your canvas, you can now receive a callback and redraw as needed:
No... this isn't how it should be. The browser should hide such details from the javascript. The canvas contents either shouldn't be lost by the GPU at all, or if they are, the browser should keep enough information to be able to recreate it (for example, a backup of all the canvas pixels plus recent draw commands executed).
Lets be honest - most GPU context losses are GPU driver bugs and should just be fixed, not require every web page to try to redraw to work around them.