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

Re: [Public WebGL] ANGLE_instanced_arrays extension proposal

On Wed, Mar 7, 2012 at 8:41 AM, Florian Bösch <pyalot@gmail.com> wrote:
IndexDB doesn't work on any mobile device yet.

Nor does this extension.  APIs aren't introduced to the Web because another API "doesn't work yet".  That's short-sighted, and the new API you define won't become available in production browsers any more quickly than the one you're waiting for.

There may be plenty of reasons this extension is useful, but "because IndexedDB isn't available yet" isn't one of them.

The rest is a bit tangential, but I'll respond to one a couple things anyway:

And then there's obvious issues like that some resources (like images) may be difficult to get array buffers from on mobile devices, so putting them in client storage would be unrealistic anyway.

You don't store images in _javascript_ storage.  You keep the original HTMLImageElement around, and reload from that.  A mature browser will handle the rest for you: decompressed pixel data for an HTMLImageElement will be discarded when it's not visible for a while (since it can be recreated from the smaller, compressed data), and the compressed data may also be discarded from memory (and reloaded from cache if necessary later).  This all happens transparently (and not all browsers do all of these optimizations, of course).

Glenn Maynard