enso/lib/rust/ensogl/component
Kaz Wesley b9ec6d4ec3
Context restoration (#7662)
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.
2023-09-14 14:40:28 +00:00
..
breadcrumbs Replace old breadcrumb implementation in the top bar with new breadcrumb component. (#7619) 2023-08-24 22:01:46 +00:00
button Introduce new focus APIs, and use for CB (#7167) 2023-07-26 22:13:48 +00:00
drop-down New node design (#7311) 2023-07-27 13:00:47 +00:00
drop-down-menu New node design (#7311) 2023-07-27 13:00:47 +00:00
drop-manager Revert "Handle wasm panics, display a message and allow a restart (#7507)" (#7708) 2023-08-31 13:30:01 +02:00
dynamic-assets Use Enso Font (#7516) 2023-08-17 18:36:12 +00:00
file-browser Introduce new focus APIs, and use for CB (#7167) 2023-07-26 22:13:48 +00:00
flame-graph Introduce new focus APIs, and use for CB (#7167) 2023-07-26 22:13:48 +00:00
grid-view Rearrange CB panels (#7350) 2023-07-31 15:33:54 +00:00
gui Introduce new focus APIs, and use for CB (#7167) 2023-07-26 22:13:48 +00:00
icons Refactor icons and breadcrumbs into separate crate. (#7419) 2023-07-31 11:54:05 +00:00
label New node design (#7311) 2023-07-27 13:00:47 +00:00
list-editor Fix new node position (#7680) 2023-09-06 14:20:45 +00:00
list-view New node design (#7311) 2023-07-27 13:00:47 +00:00
scroll-area Rearrange CB panels (#7350) 2023-07-31 15:33:54 +00:00
scrollbar Revert "Handle wasm panics, display a message and allow a restart (#7507)" (#7708) 2023-08-31 13:30:01 +02:00
selector New node design (#7311) 2023-07-27 13:00:47 +00:00
sequence-diagram Introduce new focus APIs, and use for CB (#7167) 2023-07-26 22:13:48 +00:00
shadow Bump rustc to nightly-2023-01-12 (#4053) 2023-02-02 23:05:25 +00:00
slider Rearrange CB panels (#7350) 2023-07-31 15:33:54 +00:00
spinner Force newDashboard default on the CI-built packages. (#6680) 2023-05-15 04:03:09 +02:00
src Replace old breadcrumb implementation in the top bar with new breadcrumb component. (#7619) 2023-08-24 22:01:46 +00:00
text Context restoration (#7662) 2023-09-14 14:40:28 +00:00
toggle-button Rearrange CB panels (#7350) 2023-07-31 15:33:54 +00:00
tooltip Introduce new focus APIs, and use for CB (#7167) 2023-07-26 22:13:48 +00:00
Cargo.toml Replace old breadcrumb implementation in the top bar with new breadcrumb component. (#7619) 2023-08-24 22:01:46 +00:00