MCPcopy Index your code
hub / github.com/apache/tvm / drawImageFromBuffer

Method drawImageFromBuffer

web/src/webgpu.ts:532–537  ·  view source on GitHub ↗

* Draw image from data in storage buffer. * @param ptr The GPU ptr * @param height The height of the image. * @param width The width of the image.

(ptr: GPUPointer, height: number, width: number)

Source from the content-addressed store, hash-verified

530 * @param width The width of the image.
531 */
532 drawImageFromBuffer(ptr: GPUPointer, height: number, width: number) {
533 if (this.canvasRenderManager == undefined) {
534 throw Error("Do not have a canvas context, call bindCanvas first");
535 }
536 this.canvasRenderManager.draw(this.gpuBufferFromPtr(ptr), height, width);
537 }
538
539 /**
540 * Copy raw bytes into buffer ptr.

Callers 1

showImageMethod · 0.80

Calls 2

gpuBufferFromPtrMethod · 0.95
drawMethod · 0.80

Tested by

no test coverage detected