Mercurial > hg > orthanc-stone
comparison Platforms/Wasm/wasm-viewport.ts @ 558:d5579bdc59b5 dev
Fixed wasm viewport Redraw() to use wasmModule.HEAPU8.buffer instead of the deprecated wasmModule.buffer
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 17 Apr 2019 16:13:42 +0200 |
parents | e1ba16436d59 |
children | 67d0a8da4afe |
comparison
equal
deleted
inserted
replaced
554:841ab71cd91f | 558:d5579bdc59b5 |
---|---|
129 } else { | 129 } else { |
130 // Create an accessor to the rendering buffer (i.e. create a | 130 // Create an accessor to the rendering buffer (i.e. create a |
131 // "window" above the heap of the WASM module), then copy it to | 131 // "window" above the heap of the WASM module), then copy it to |
132 // the ImageData object | 132 // the ImageData object |
133 this.imageData_.data.set(new Uint8ClampedArray( | 133 this.imageData_.data.set(new Uint8ClampedArray( |
134 this.module_.buffer, | 134 this.module_.HEAPU8.buffer, |
135 this.renderingBuffer_, | 135 this.renderingBuffer_, |
136 this.imageData_.width * this.imageData_.height * 4)); | 136 this.imageData_.width * this.imageData_.height * 4)); |
137 | 137 |
138 this.context_.putImageData(this.imageData_, 0, 0); | 138 this.context_.putImageData(this.imageData_, 0, 0); |
139 } | 139 } |