Make emscripten with threads compile

This commit is contained in:
Surma
2018-11-02 18:34:23 +00:00
parent 30e78e8ab7
commit 7a08815bcf
5 changed files with 4 additions and 6 deletions

BIN
codecs/really_big.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 MiB

View File

@@ -14,14 +14,12 @@ echo "============================================="
emcc \
${OPTIMIZE} \
--bind \
-D WEBP_USE_THREAD \
-s ALLOW_MEMORY_GROWTH=1 \
-D WEBP_USE_THREAD=1 \
-s USE_PTHREADS=1 \
-s ASSERTIONS=1 \
-s PTHREAD_POOL_SIZE=2 \
-s PTHREAD_POOL_SIZE=4 \
-s TOTAL_MEMORY=268435456 \
-s WASM_MEM_MAX=268435456 \
-s 'EXPORT_NAME="webp_enc"' \
--std=c++11 \
-I node_modules/libwebp \
-o ./webp_enc.js \

View File

@@ -19,7 +19,7 @@
Module.onRuntimeInitialized = async _ => {
console.log('Version:', Module.version().toString(16));
const image = await loadImage('../example.png');
const image = await loadImage('../really_big.jpg');
let start = performance.now();
const result = Module.encode(image.data, image.width, image.height, {
quality: 75,

File diff suppressed because one or more lines are too long

Binary file not shown.