W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2011

[whatwg] ArrayBuffer and the structured clone algorithm

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 09 May 2011 21:56:22 -0400
Message-ID: <4DC89B46.9060402@mit.edu>
On 5/9/11 6:44 PM, Ian Hickson wrote:
>> For this reason I think we need to keep CanvasPixelArray distinct. I
>> certainly hope that Web IDL does not change its conversion rules to
>> mimic the clamping behavior in CanvasPixelArray. Right now Web IDL
>> delegates to the ECMA-262 specification for primitive conversions, which
>> have the wrapping behavior of C-style casts rather than clamping
>> behavior. Forcing clamping for out-of-range integer values would impose
>> a significant negative performance constraint on typed arrays.
>
> I haven't changed CanvasPixelArray.

Note that Gecko implements CanvasPixelArray as a kind of typed array 
that has the right kind of behavior on assignment.

This means that you can extract the array buffer as usual create other 
typed views of it, etc.

We feel that there are significant benefits to doing this and would be 
interested in trying to get something like that standardized if others 
are interested as well.  If not, of course, then we just keep our 
current behavior, but that does mean that CanvasPixelArray in Gecko has 
properties/methods not present in some other UAs....

-Boris
Received on Monday, 9 May 2011 18:56:22 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:33 UTC