[whatwg] canvas, img, file api and blobs

On Tue, Feb 16, 2010 at 6:22 PM, Chris Marrin <cmarrin at apple.com> wrote:

>
> On Feb 16, 2010, at 9:00 AM, Eric Carlson wrote:
>
> > Chris -
> >
> >   Welcome to the HTML5 WG email torrent ;-)
> >
> >   Here is a message that you might actually care to read.
> >
> > eric
> >
> >
> >
> > Begin forwarded message:
> >
> >> From: Joel Webber <jgw at google.com>
> >> Date: February 16, 2010 8:39:31 AM PST
> >> To: Stefan Haustein <haustein at google.com>
> >> Cc: Maciej Stachowiak <mjs at apple.com>, whatwg at whatwg.org, Jonas Sicking
> <jonas at sicking.cc>, Stef Epardaud <stef at epardaud.fr>
> >> Subject: Re: [whatwg] canvas, img, file api and blobs
> >>
> >> On Tue, Feb 16, 2010 at 7:38 AM, Stefan Haustein <haustein at google.com>
> wrote:
> >> On Tue, Feb 16, 2010 at 10:08 AM, Maciej Stachowiak <mjs at apple.com>
> wrote:
> >>
> >> On Feb 16, 2010, at 12:13 AM, Jonas Sicking wrote:
> >>
> >>
> >> Absolutely! I definitely agree that we need a type like this. The
> >> sooner the better. On that note, do you know what the latest status is
> >> within ECMA on this? I know you made a proposal on the webapps list
> >> (or was it here?), did that go anywhere?
> >>
> >> I made my proposal to ECMA TC-39 (the relevant committee). I will try to
> polish it and request it as an agenda item for the next face-to-face (in
> March). Independently, WebGL's typed arrays have been proposed.
> >>
> >> Hi Maciej,
> >>
> >> do you have a link to your proposal?
> >>
> >> 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.
> >
>
> We've been getting pretty good traction on Vlad's ArrayBuffers proposal,
> which was taken from the WebGL spec. Our current plan is to change the names
> in the browsers (WebKit, Chrome and Mozilla) to the "non-WebGL specific"
> names Vlad proposes in his spec. We'd really like this to be the "one true
> binary data access" mechanism for HTML. We're talking to the File API guys
> about this and I think this API can be adapted in all the other places as
> well.
>
> As far as performance goes, can you point me at some quantitative data?
> When you say it's an "orders-of-magnitude" bottleneck, what are you
> comparing it to? The API is very new and we certainly want to improve it for
> the various purposes it can be put to. We've even talked about optimizations
> inside the JS implementations to improve access performance.
>

If we can get a webgl buffer from an XHR response (which would be a *huge*
improvement), we'd still need to parse the binary data when decoding JPEG
headers, protocol buffers etc.

Constructing ints / longs from bytes in Javascript will probably be slow, so
in addition to the typed arrays, we'd love to have some kind of access that
would be similar to Java's DataInput (+DataOutput, see
http://java.sun.com/j2se/1.4.2/docs/api/java/io/DataInput.html ), but with
endianess support....

Stefan


>
> -----
> ~Chris
> cmarrin at apple.com
>
>
>
>
>


-- 
Stefan Haustein
Google UK Limited

Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
9TQ; Registered in England Number: 3977902
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100216/82e3e11d/attachment-0001.htm>

Received on Tuesday, 16 February 2010 11:25:34 UTC