Mercurial > hg > orthanc-stone
comparison Platforms/Wasm/wasm-viewport.ts @ 747:556822c70742 rtviewer19branch
Backfix of d5579bd: Fixed wasm viewport Redraw() to use wasmModule.HEAPU8.buffer instead of the deprecated wasmModule.buffer
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 22 May 2019 13:49:31 +0200 |
parents | e1ba16436d59 |
children | 67d0a8da4afe |
comparison
equal
deleted
inserted
replaced
719:633bb89d4a6e | 747:556822c70742 |
---|---|
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 } |