- From: Chris Marrin <cmarrin@apple.com>
- Date: Wed, 09 Mar 2011 10:24:39 -0800
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- Cc: Glenn Maynard <glenn@zewt.org>, Web Applications Working Group WG <public-webapps@w3.org>
On Mar 7, 2011, at 6:07 PM, Boris Zbarsky wrote: > On 3/7/11 8:55 PM, Glenn Maynard wrote: >> I'd expect CanvasPixelArray to allow optimizations that ArrayBuffer >> doesn't, since the implementation can use the native surface format, >> translating to RGBA for the script transparently. This can matter for >> streaming textures to OpenGL/D3D, too; creating BGRA textures on nVidia >> hardware is typically much faster than RGBA ones. > > 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? > >> I don't recall if this has been brought up: are there cases where >> explicit zero-copy messaging is better than transparent copy-on-write? > > Transparent copy on write requires that each write do a "should I copy?" check, right? Yeah, nothing's free, unless you have copy-on-write hardware or something. ----- ~Chris cmarrin@apple.com
Received on Wednesday, 9 March 2011 18:25:14 UTC