[whatwg] canvas, img, file api and blobs
stef at epardaud.fr
Tue Feb 16 09:09:45 PST 2010
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
> (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?)
More information about the whatwg