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

Re: [Public WebGL] Typed Array spec updates: strawman proposals




Andreas, Dave, can you please have a look at the below? Who else is working on Typed Arrays?


On 15/11/11 03:38 PM, Kenneth Russell wrote:
On Tue, Nov 15, 2011 at 6:02 AM, Stephen Bannasch
<stephen.bannasch@deanbrook.org>  wrote:
At 1:14 PM -0700 5/31/11, Kenneth Russell wrote:
On Tue, May 31, 2011 at 10:43 AM, Gregg Tavares (wrk)<gman@google.com> wrote:
2) I want a copy of the data in the buffer. How do I do this? Are there now
2 constructors for views? One to make a copy and one to make view?
Does it work as is or does it need more?

The simplest way would be to call "buffer.slice(0)".

The slice function is implemented for ArrayBuffers in Chrome 17 and Safari nightly but not in FF 11.

In the spec it's listed in straw-man status.

I'd like to be able to copy typed arrays as quickly as possible. Is ArrayBuffer.slice() likely to become part of the specification?

+bjacob

I think it's likely to remain. There was some discussion about whether
it is implementable in pure JavaScript (it is) and therefore whether
it should be added to the API. The consensus seems to be that despite
the fact that it is implementable in pure JS, it is a small addition
to the existing API which is more efficient than doing the same
operation in JavaScript -- it avoids allocating two garbage
Uint8Arrays.

The API was added recently which is why it isn't widely implemented.
I'm not aware of any objections.

I'm not working on Typed Arrays myself; CC'ing some Mozilla folks who are.

Benoit

-----------------------------------------------------------
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
-----------------------------------------------------------