[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Should the non-typed-array overloads of uniform*v and vertextAttrib*v be IDL arrays or IDL sequences?
- To: Boris Zbarsky <firstname.lastname@example.org>
- Subject: Re: [Public WebGL] Should the non-typed-array overloads of uniform*v and vertextAttrib*v be IDL arrays or IDL sequences?
- From: Kenneth Russell <email@example.com>
- Date: Fri, 27 Apr 2012 15:14:09 -0700
- Cc: public webgl <firstname.lastname@example.org>, Cameron McCormack <email@example.com>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record; bh=GRAOr44wLzf9jz1RTJzd3sml65lILPcAqNnWNTwJtVI=; b=QvS+dra+OsjYXyxvzPIdMCeGNTYsosLix4uNjRElfuMHww0uRfr4JO9f9iRckQa9sX +VGTsaSs+BFVt0tYj8tMT44be3ewzaA3rDeaTDL2HJdF005liY4Vokcsup9GKScAXJhx 7+nhqXF4WjdmVd5+278WBXP42xUofWtoiAHuqi6ReL3s+tGXmsP1y37wbbc8iScus+B8 3BLVRbhI8rOQdGz3qMKrMTil1d0N9yl696wbB4f+my6Yk1SItAjX3ugQ8GPkRRhrhAzb uAN4eknlm7qVqs1Be7qSdXxEmMt/iN2vV4xo1E+Rkk6uHbxN9ejanNcdQd75pbVpCUX1 ntSA==
- In-reply-to: <4F99FFD5.firstname.lastname@example.org>
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- References: <4F8B1375.email@example.com> <CAMYvS2e-scyFe3eKf=qD-NaXWJpiC5zLxgA-j2ee8PjDSj4BWg@mail.gmail.com> <4F99FFD5.firstname.lastname@example.org>
- Sender: email@example.com
On Thu, Apr 26, 2012 at 7:09 PM, Boris Zbarsky <firstname.lastname@example.org> wrote:
> On 4/26/12 8:26 PM, Kenneth Russell wrote:
>> Early drafts of the WebGL spec used sequences for these arguments.
>> When arrays were added to Web IDL, they were changed to arrays, to
> To realize this potential one would need to have platform array objects for
> those types, right?
>> If they were changed to sequence<T>, then could a browser still pass
>> them throughout its DOM bindings by reference
> gets copied (per WebIDL) no matter whether the argument is float or
> sequence<float>. Quoting from
> http://dev.w3.org/2006/webapi/WebIDL/#es-array :
> * If V is a platform array object whose element type is T, then
> return the array that the platform array object represents.
> * Let values be the result of converting V to a sequence with
> element type T.
> So the only way for these overloads to do anything effective is if some
> _other_ specification defines a way to create platform array objects, right?
> If such a beastie is ever created, I think browser DOM bindings could in
> fact special-case this situation to pass it by reference, but it would take
> some sort of GLContext-specific code.
> On the other hand, right now implementing the binding as specced technically
> requires a browser to implement these platform array object things, which no
> browser actually has yet. So they could just as easily special-case the
> fact that while it says "array" in the IDL in practice they should do the
> sequence conversion here.....
Thanks for the explanation. From a practical standpoint I think that
the change from array to sequence won't have any effect on WebKit's
DOM bindings, at least. It sounds like the only requirement is that
the incoming ECMAScript array isn't mutated, and it can't be in the
current bindings. I'm sure there's probably some rule about getters
being called in a certain order but fortunately there aren't
conformance tests for this.
I've updated the spec changing these array references to sequences.
You are currently subscribed to email@example.com.
To unsubscribe, send an email to firstname.lastname@example.org with
the following command in the body of your email: