This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Commit f2154ef
authored
Reverts: #56206
Initiated by: jonahwilliams
Reason for reverting: failing to roll into framework: flutter/flutter#157919
Original PR Author: eyebrowsoffire
Reviewed By: {harryterkelsen}
This change reverts the following previous change:
This PR creates a single-threaded version of the skwasm renderer, appropriate for non-crossOriginIsolated browsing contexts.
* The single threaded renderer is essentially the same as the multi-threaded renderer, except instead of spawning a web worker and posting messages to it, it simply schedules microtasks on the main thread in their place.
* The new renderer is vended as `skwasm_st.js` and `skwasm_st.wasm` in the same location as multithreaded skwasm. In order to properly build and function, we needed some fixes I put into emscripten that landed in version 3.1.70. That version also changed some behavior that required a few fixes to the CanvasKit build files.
* The skwasm loader in flutter.js has been modified to use the skwasm_st variants when encountering a non-crossOriginIsolated context but a browser and configuration that otherwise would allow the use of skwasm. I also added a new `forceSingleThreadedSkwasm` option to the flutter configuration so that we can override this behavior, especially so that we can accurately benchmark the single threaded renderer in a crossOriginIsolated environment.
* I also consolidated a bunch of our shards that run tests to just have one per browser/platform combination, so four total. This will address flutter/flutter#124682
1 parent 3bf6fcc commit f2154ef
File tree
35 files changed
+1704
-940
lines changed- ci
- builders
- licenses_golden
- lib/web_ui
- dev
- steps
- flutter_js/src
- lib/src/engine
- skwasm
- skwasm_impl
- raw
- skwasm_stub
- skwasm
- test
- fallbacks
- ui
- skia/modules/canvaskit
- third_party/canvaskit
- tools
- web_sdk
35 files changed
+1704
-940
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
765 | | - | |
| 765 | + | |
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
| |||
0 commit comments