[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Web Workers and ArrayBuffers?

On Tue, Apr 12, 2011 at 1:07 PM, Kenneth Russell <kbr@google.com> wrote:
> We are about to start revising the Typed Array specification to define
> the behavior of passing ArrayBuffers and typed array views between the
> main thread and worker threads. The new behavior will be zero-copy,
> and if you ping-pong the ArrayBuffers back and forth, you'll be able
> to implement really efficient producer-consumer queues.

Note that there's been discussion recently on a couple mailing lists
on the subject of zero-copy PostMessage, though it stalled out:

"WebWorkers and images" on whatwg:

"Using ArrayBuffer as payload for binary data to/from Web Workers" on webapps:

I don't think this belongs in the Typed Array spec, but as part of the
Web Messaging and Web Worker specs, to allow zero-copy messaging with
a consistent API for any supported types.  CanvasPixelArray for 2d
canvas is another obvious candidate (though I *really* wish
CanvasPixelArray and ArrayBuffer weren't totally separate APIs in the
first place).

I'm not sure how this could be done in Typed Arrays without support
from the Web Messaging spec in the first place...

Glenn Maynard
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl