- Update to newer APIs.
- Avoid manual pixel-by-pixel copy in favour of decoding directly to desired format & bit depth.
- Avoid use-after-free by cloning the Uint8Array Wasm memory view into a JS-owned Uint8Array right away.
Add `position: relative` to the parent `div` that owns the scrollbar, so that Install button positions itself relative to it and not to the whole document.
Fixes a bug where button would get rendered on top of a scrollbar.
- Store Emscripten cache inside node_modules/.em_cache. Docker image ships without LTO libs, so Emscripten has to rebuild stdlibs on every build otherwise.
- Merge webp_enc + webp_dec build scripts. Core libwebp library is same in both cases, so there's no point in storing and building two copies of it.
This makes building simpler and allows us to potentially use multithreading version in the future.
For now points to a custom fork of OxiPNG that enables WebAssembly support, as PR is still pending review.
This intentionally excludes time of loading corresponding modules, and only measures actual processing.
While this is not perfect as it's not integrated in the UI (cc @jakearchibald), it gives at least some way to measure performance of different codecs and their integrations on particular files.
This delegates loading of Wasm modules to Webpack itself, making wrapper code simpler.
Emscripten-generated modules are still using custom loading glue as they're not compatible with Webpack.
* Scaling works on native
* It works in wasm
* Integrate with UI
* Remove benchmark
* Integrate Hqx into Resizer module
* Link against repo for hqx
* Remove unused defaultOpts
* Re-add test file
* Adding size dropdown
* Chrome: go and sit on the naughty step
* Better docs
* Review
* Add link to crbug
* Update src/codecs/processor-worker/index.ts
Co-Authored-By: Jake Archibald <jaffathecake@gmail.com>
* Terminate worker inbetween resize jobs
* Quick test
* More testing
* More testing
* Removing transfer for now
* Changing name so it's easier to tell them apart when installed
* Disable minification to ease debugging
* Adding navigate lock
* lol oops
* Add minifying back
* Removing minification again, for debugging
* Removing broadcast channel bits, to simplify the code
* Revert "Removing broadcast channel bits, to simplify the code"
This reverts commit 0b2a3ecf2986aae0dd65fdd1ddda2bd9e4e1eac7.
* I think this fixes it
* Refactor
* Suppress flash of home screen during share target
* Almost ready, so switching to real name
* Removing log
* Ahh yes the trailing comma thing
* Removing use of BroadcastChannel
* Reducing ternary
* Add sRGB -> RGB conversion before resize
* Add clamping for color space conversions
* Clip for demultiplication as well
* Fixing linear <-> srgb conversion
* Update benchmark
* Decouple srgb calculations
* Generate lookup tables
* Update src/codecs/resize/options.tsx
* Defaulting on, renaming, removing redundant state
* Implement alpha premultiplication
* Add benchmark to resize
* Only display "Premultiply alpha" if it's one of the rust resize types.
* Add comment about division by zero