Commit Graph

7 Commits

Author SHA1 Message Date
Ingvar Stepanyan
684b041262 Add feature detection to OxiPNG 2020-09-24 13:29:32 +01:00
Ingvar Stepanyan
60dacff05e fixup 2020-09-24 00:03:00 +01:00
Ingvar Stepanyan
41e3868a13 Switch to crossbeam-channel
Still not perfect due to usage of a static global, but this is much cleaner and more efficient thanks to proper blocking of Workers that wait for new messages instead of a manual spin-loop.
2020-09-24 00:02:57 +01:00
Ingvar Stepanyan
9c60d3286e Parallel OxiPNG improvements
- Refactor to work around Chromium's issue with postMessage queuing. https://bugs.chromium.org/p/chromium/issues/detail?id=1075645
 - Convert codec code to TypeScript.
 - Make separate parallel and non-parallel builds.
 - Switch to nightly Rust for OxiPNG to allow parallel builds (but also reuse it for regular builds to avoid installing two toolchains).
2020-09-23 23:59:32 +01:00
Ingvar Stepanyan
6db70e5e27 Rework fallback for postMessage issue
Now initialise all workers with module+memory separately, and then instead of using postMessage to send thread pointers, push them into a crossbeam-deque on the Rust side.

Rayon already depends on crossbeam-dequeue, so we're not even adding another dependency, and this model allows us to push "tasks" (thread pointers) on the main thread and pop them on worker threads in arbitrary order without sacrificing correctness.
2020-09-23 23:54:34 +01:00
Ingvar Stepanyan
8d991a256e OxiPNG + threads PoC 2020-09-23 23:30:51 +01:00
Jake Archibald
17ffa57a8b Updating oxi build & enabling alpha optimisations (#776)
* Updating oxi build & enabling alpha optimisations

* Renaming package
2020-07-14 16:19:35 +01:00