W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: Using ArrayBuffer as payload for binary data to/from Web Workers

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 07 Mar 2011 22:18:24 -0500
Message-ID: <4D75A000.8030907@mit.edu>
To: Glenn Maynard <glenn@zewt.org>
CC: Chris Marrin <cmarrin@apple.com>, Web Applications Working Group WG <public-webapps@w3.org>
On 3/7/11 10:12 PM, Glenn Maynard wrote:
>     But modifying the ImageData is not supposed to modify what the
>     graphics card sees, right?  So you have to make a copy here on
>     putImageData (or on the next write to the image data), right?
>
> Right, either way you need to make a copy when you send the data back to
> the canvas.  But, if the surface format of the memory buffer matches a
> native format of the graphics card, the copy is very fast--probably a
> DMA, for hardware-accelerated surfaces.

Sure, so you're trading off performance on the copy for possibly slower 
performance of the JS, depending on how you implement the channel 
reordering...

Would be interesting to have someone implement this and measure.  ;)

-Boris
Received on Tuesday, 8 March 2011 03:18:58 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:43 GMT