mirror of
https://github.com/enso-org/enso.git
synced 2024-11-22 22:10:15 +03:00
b9ec6d4ec3
Add support for recovering from GL context loss. When the context is restored, the loading spinner is shown until shaders finish recompiling. [vokoscreenNG-2023-08-25_09-39-11.webm](https://github.com/enso-org/enso/assets/1047859/cfa90ec5-72a1-41e6-bafa-177fa5e85fb2) *While the context is missing, the loading spinner is rendered in the 0% state. (This condition will not normally be observed, except momentarily, as the browser should restore the context immediately if it is lost while the page is visible.) When we receive a new context, the spinner switches to the 90% state until restoration completes. Restoration is fast, as we don't need to do much work except recompiling shaders.* # Important Notes - A new debug hotkey, Ctrl+Alt+Shift+X, causes context loss for testing. Pressing it a second time causes context restoration. - `Texture` is still a CPU-bound texture. It now uses the "immutable" `texStorage/texSubImage` API, which is a ["preferred alternative"](https://registry.khronos.org/webgl/specs/latest/2.0/#3.7.6) to the `texImage` API because it can be more efficient. - The type for texture uniforms is now `Uniform<Option<Texture>>`. Texture uniforms are decoupled from the context. - A new `ContextLost` error type can be returned by functions that cannot complete if the context is lost. - Fix some crashes that could occur when context was lost. - Clarify ownership of some rendering-related types: Externalize, and where possible eliminate, `Rc/RefCell`s. |
||
---|---|---|
.. | ||
gui | ||
gui2 | ||
ide-desktop |