[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Typed Array setter for partial arrays (and typed array performance)

On Wed, Apr 27, 2011 at 10:48 AM, Chris Marrin <cmarrin@apple.com> wrote:
> On Apr 21, 2011, at 4:12 PM, Kenneth Russell wrote:
>> ...
>> As part of the planned Typed Array API changes to support efficient
>> communication with web workers, the plan is to add convenience methods
>> to copy ArrayBuffers and possibly sub-portions of them. I think we
>> should invest our time in moving those changes forward.
> Why is it necessary to have functions to copy ArrayBuffers. Isn't the copy constructor in the TypedArrays sufficient?

That's a fair point. During one of the face-to-face meetings with
Mozilla it seemed that if we used transfer-of-ownership for
ArrayBuffers sent via postMessage, then we had to make it easy to copy
them. You're right, though, that the slice() operation can be easily
implemented in pure JavaScript, with the only cost the creation of two
temporary Uint8Arrays.

Should we just get rid of it and provide non-normative text showing
how it could be implemented?

You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl