[whatwg] Canvas pixel manipulation and performance
excors+whatwg at gmail.com
Sun Nov 29 11:05:17 PST 2009
On Sun, Nov 29, 2009 at 6:59 PM, Kenneth Russell <kbr at google.com> wrote:
> On Sat, Nov 28, 2009 at 9:47 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>> Are they even byte stores, necessarily? I know in Gecko imagedata is just a
>> JS array at the moment; it stores each of R,G,B,A as a JS Number (with the
>> usual "if it's an integer store as an integer" optimization arrays do).
>> That might well change in the future, and I hope it does, but that's the
>> current code.
>> I can't speak to what the behavior is in Webkit, and in particular whether
>> it's even the same when using V8 vs Nitro.
> In Chromium (WebKit + V8), CanvasPixelArray property stores write
> individual bytes to memory. WebGLByteArray and WebGLUnsignedByteArray
> behave similarly but have simpler clamping semantics.
Would it be helpful (for simplicity or performance or consistency etc)
to change the specification of CanvasPixelArray to have those "simpler
clamping semantics"? (I don't expect there would be compatibility
problems with changing it now, particularly since Firefox doesn't
implement clamping at all in CPA.)
excors at gmail.com
More information about the whatwg