W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2012

Re: [Public WebGL] Re: WebGL IDL for uniform1fv is not valid WebIDL

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 03 Apr 2012 10:12:07 -0400
Message-ID: <4F7B0537.5050804@mit.edu>
To: Glenn Maynard <glenn@zewt.org>
CC: Cameron McCormack <cam@mcc.id.au>, public webgl <public_webgl@khronos.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 4/2/12 8:42 PM, Glenn Maynard wrote:
> On Mon, Apr 2, 2012 at 7:26 PM, Boris Zbarsky <bzbarsky@mit.edu
> <mailto:bzbarsky@mit.edu>> wrote:
>         I think removing the Float32Array overload will make passing JS
>         Arrays
>         of Numbers and Float32Array objects work.
>     But require copies in the process, no?  That seems highly
>     undesirable in this case.
> If it matters as an optimization, implementations could still create
> separate overloads for this as long as it's transparent to the user,
> right?

There are tons of edge cases here, and more being added by the JS folks 
all the time, so doing anything other than exactly what the spec says is 
a good way of introducing bugs...

As an example, if the spec says to get the elements from the input thing 
one by one in order to construct the IDL array, then grabbing a float* 
from an input typed array would have observably different behavior in 
situations where the page has defined a property getter for an indexed 
property on the typed array object in question.  Unless the WebIDL 
indexed access takes priority over user-defined properties, which I 
think it might for the moment.  I'd really rather not have the 
performance characteristics of the platform depending on such fragile 
interactions if we can avoid it.  :(

Received on Tuesday, 3 April 2012 15:18:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:06 UTC