enso/lib/rust
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
..
automata Improved FRP implementation (#6944) 2023-06-17 16:14:19 +02:00
bitmap Fix #6011. Don't use debug-assertion; fix sanity check that wasn't being run. (#6187) 2023-04-10 06:41:37 +00:00
callback Vector Editor first visual implementation (#6245) 2023-04-19 04:26:01 +02:00
code-builder New node design (#7311) 2023-07-27 13:00:47 +00:00
config-reader Bump rustc to nightly-2023-01-12 (#4053) 2023-02-02 23:05:25 +00:00
data-structures Improved FRP implementation (#6944) 2023-06-17 16:14:19 +02:00
debug-api Hotkey to display GPU debug info (#6188) 2023-04-04 12:32:16 +02:00
enso-font Use Enso Font (#7516) 2023-08-17 18:36:12 +00:00
ensogl Context restoration (#7662) 2023-09-14 14:40:28 +00:00
executor Drop method exported from WASM + removing leaks. (#6365) 2023-04-25 15:38:29 +00:00
font Fix atom types in dropdowns. (#7670) 2023-09-05 14:51:33 +00:00
frp Revert "Handle wasm panics, display a message and allow a restart (#7507)" (#7708) 2023-08-31 13:30:01 +02:00
frp2 Improved FRP implementation (#6944) 2023-06-17 16:14:19 +02:00
fuzzly Rearrange CB panels (#7350) 2023-07-31 15:33:54 +00:00
generics Improved FRP implementation (#6944) 2023-06-17 16:14:19 +02:00
json-rpc Improved FRP implementation (#6944) 2023-06-17 16:14:19 +02:00
json-to-struct Fixing Electron runner (#5633) 2023-02-19 01:37:58 +01:00
launcher-shims Bump rustc to nightly-2023-01-12 (#4053) 2023-02-02 23:05:25 +00:00
logging Reworked ide watch and ide start commands (#5634) 2023-03-02 23:00:47 +01:00
macro-utils Introduce new focus APIs, and use for CB (#7167) 2023-07-26 22:13:48 +00:00
metamodel Improved FRP implementation (#6944) 2023-06-17 16:14:19 +02:00
notification Implement documentation IR (#4024) 2023-01-12 14:50:33 +00:00
parser Gui2: integrate rust Enso parser (#7753) 2023-09-07 12:54:01 +00:00
prelude Gui2: integrate rust Enso parser (#7753) 2023-09-07 12:54:01 +00:00
profiler Introduce new focus APIs, and use for CB (#7167) 2023-07-26 22:13:48 +00:00
reflect Introduce new focus APIs, and use for CB (#7167) 2023-07-26 22:13:48 +00:00
shapely Gui2: integrate rust Enso parser (#7753) 2023-09-07 12:54:01 +00:00
shortcuts Bump rustc to nightly-2023-01-12 (#4053) 2023-02-02 23:05:25 +00:00
text Fix atom types in dropdowns. (#7670) 2023-09-05 14:51:33 +00:00
types Fix atom types in dropdowns. (#7670) 2023-09-05 14:51:33 +00:00
web Gui2: integrate rust Enso parser (#7753) 2023-09-07 12:54:01 +00:00
zst New node design (#7311) 2023-07-27 13:00:47 +00:00