Commit Graph

1114 Commits

Author SHA1 Message Date
Ingvar Stepanyan
8c5c97e106 Remove obsolete @ts-ignore 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
a9d3bd71b5 Bump oxipng
Integrating some upstream fixes from my branch.
2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
0d0a9b4cdf Add COOP+COEP headers 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
f583770696 Explicitly disable HDR only for encoder 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
bae243ccdb Add feature detection to OxiPNG 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
02c113a68f Point oxipng to a patched version
Some upstream changes required for parallel build to work.
2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
600eead007 Disable parallel feature for non-parallel OxiPNG 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
05416768d5 Update oxipng build system 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
35d31f2324 Add some comments to explain Rust thread glue 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
82fadac70e Fixup import.meta in OxiPNG 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
47f9d22dd8 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-10-07 20:42:48 +01:00
Ingvar Stepanyan
9420dba3bc 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-10-07 20:42:48 +01:00
Ingvar Stepanyan
e462875807 Type fix for gesturestart event 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
0747d2c419 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-10-07 20:42:48 +01:00
Ingvar Stepanyan
4c658b79ef OxiPNG + threads PoC 2020-10-07 20:42:48 +01:00
Ingvar Stepanyan
685558847f Multithread AVIF PoC 2020-10-07 20:42:48 +01:00
Jason Miller
612cee0011 not-fully-working autoOptimize for oxipng 2020-10-05 22:51:53 -04:00
Jason Miller
911ca32c35 Fancy progress output 2020-10-05 22:51:23 -04:00
Jason Miller
49cb8b268c Fix misnamed butteraugliDistanceGoal parameter 2020-10-05 22:50:49 -04:00
Jason Miller
4946268ae2 Move image decoding into the worker pool 2020-10-05 22:50:06 -04:00
Jason Miller
4487da9e9e Add Babel to fix Node <14 compat 2020-10-05 22:45:36 -04:00
Jason Miller
09f65d0cd7 Fix worker_pool for node 2020-10-05 22:38:23 -04:00
Trevor Manz
63ac34a662 Promisify emscripten modules & fix webp examples (#817) 2020-09-30 00:05:59 +01:00
Surma
261b3ad013 0.3.1 2020-09-21 23:58:39 +01:00
Surma
1b886aa4e2 v0.3.0 2020-09-21 18:21:00 +01:00
Surma
1d5fd98a3e Add support for no-value encoder flags 2020-09-21 18:20:02 +01:00
Surma
588d5ad44e Add OxiPNG 2020-09-21 18:14:42 +01:00
Surma
139b635eed Add PNG encoding support 2020-09-18 16:00:29 +01:00
Surma
516c0aa8e7 Update wasm-bindgen version 2020-09-17 14:49:58 +01:00
Surma
273b4211c9 Add support for PNG decoding (encoding still buggy) 2020-09-16 23:59:06 +01:00
Surma
ef920ac6ba Add suffix support 2020-09-16 14:58:04 +01:00
Surma
f445a5dcbe Parameterize auto optimizer 2020-09-16 13:32:09 +01:00
Surma
42f9e4aed2 Merge pull request #828 from GoogleChromeLabs/create-dir
Ensure node_modules is created
2020-09-16 10:36:11 +01:00
Jake Archibald
e14790f0b9 Ensure node_modules is created 2020-09-16 10:24:20 +01:00
Velu S Gautam
dfee848a39 Update example.html (#827)
rawImage is a Uint8ClampedArray and doesn't have width and height property.
2020-09-16 07:42:32 +01:00
Surma
c8dc88f8a1 Add auto optimizer 2020-09-15 17:53:49 +01:00
Jake Archibald
a437afdf2b Update AVIF build to produce shipped wasm (#823)
* argh

* It works!

* Silly me

* Changes following feedback
2020-09-15 11:08:20 +01:00
Surma
1d7b6ab13e v0.2.0 2020-09-14 17:23:01 +01:00
Surma
1e700cd7c3 Add better output formatting 2020-09-14 17:20:49 +01:00
Surma
01c04d4a72 Add worker pool implementation 2020-09-14 17:05:02 +01:00
Surma
df45b996d1 v0.1.3 2020-09-09 23:44:01 +01:00
Surma
c9a271f57a Use __filename for worker instead 2020-09-09 23:43:30 +01:00
Surma
c37f798565 v0.1.2 2020-09-09 23:38:39 +01:00
Surma
e9b9993189 Add shebang to output 2020-09-09 23:38:26 +01:00
Surma
96b1ec2356 v0.1.1 2020-09-09 23:30:07 +01:00
Surma
e5d254ad80 Add package-level bin 2020-09-09 23:29:48 +01:00
Surma
b1b3c8c461 v0.1.0 2020-09-09 18:57:32 +01:00
Surma
1f2f5d1c61 Add .npmignore 2020-09-09 18:52:21 +01:00
Surma
12a719f05a Make it public 2020-09-09 18:33:47 +01:00
Surma
28c7b7aa94 Put right package name 2020-09-09 18:26:42 +01:00