Browse Source

Fix uninitialized return when no strokes are submitted to a thread

sdf
A.Olokhtonov 2 weeks ago
parent
commit
d618913111
  1. 2
      client/speed.js
  2. 1
      client/wasm/lod.c
  3. BIN
      client/wasm/lod.wasm

2
client/speed.js

@ -43,7 +43,7 @@ async function init_wasm(state) { @@ -43,7 +43,7 @@ async function init_wasm(state) {
env: { 'memory': memory }
});
const nworkers = 1; //navigator.hardwareConcurrency;
const nworkers = navigator.hardwareConcurrency;
state.wasm.exports = master_wasm.instance.exports;
state.wasm.heap_base = state.wasm.exports.alloc_static(0);

1
client/wasm/lod.c

@ -207,6 +207,7 @@ do_lod(int *clipped_indices, int clipped_count, float zoom, @@ -207,6 +207,7 @@ do_lod(int *clipped_indices, int clipped_count, float zoom,
{
if (clipped_count == 0) {
result_count[0] = 0;
result_batch_count[0] = 0;
return;
}

BIN
client/wasm/lod.wasm

Binary file not shown.
Loading…
Cancel
Save