W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2010

[whatwg] canvas, img, file api and blobs

From: Stef Epardaud <stef@epardaud.fr>
Date: Tue, 16 Feb 2010 18:09:45 +0100
Message-ID: <20100216170944.GA23413@inforealm.org>
On Tue, Feb 16, 2010 at 11:39:31AM -0500, Joel Webber wrote:
>    And in particular, does it bear any resemblance to the WebGLArray
>    interfaces, as proposed in
>    ([3]http://people.mozilla.com/~vladimir/jsvec/TypedArray-spec.html)? I'm
>    particularly concerned with the interfaces among all these different
>    subsystems (WebGL, Canvas, XHR, File, etc., as being discussed on this
>    thread) that want to operate on binary data.
>    We've found that getting data from XHR to WebGL via WebGLArrays to be a huge
>    (read: probably orders-of-magnitude) bottleneck; but being able to slice
>    mesh and texture data out of arrays directly from XHR responses would
>    completely fix this.

The TypedArray proposal seems to lack a way to efficiently copy ranges
of bytes from one array to another. This is essential if we want to
resize arrays (which is going to be needed if we want to add EXIF data
to an image for example). Copying byte by byte would be unacceptable.

It is mentioned in section 5, but a proposed solution is a constructor,
which is a bit restrictive (how would we concatenate two byte arrays?)
-- 
St?phane Epardaud
Received on Tuesday, 16 February 2010 09:09:45 UTC

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