Re: [whatwg] Proposal: downsample while decoding image blobs in createImageBitmap()

2013-12-18 Thread Robert O'Callahan
Yes. Especially on these devices, JPEG decoding is undue latency. Also, Rik's suggestion makes an ImageBitmap just a thin wrapper around a Blob, with decoding performed every time we do a drawImage call. That's bad for performance in many cases. David's proposal lets the author be a little bit

[whatwg] Proposal: downsample while decoding image blobs in createImageBitmap()

2013-12-17 Thread David Flanagan
This is a proposal for changes to ImageBitmap and createImageBitmap() to enable the memory-efficient display of large images on small screens. Background: The camera resolution on mobile devices has grown (and is continuing to grow) much faster than the screen size and memory of those devices.

Re: [whatwg] Proposal: downsample while decoding image blobs in createImageBitmap()

2013-12-17 Thread Rik Cabanier
Hi David, is there a reason why you are completely decoding the image when you create the imageBitmap? [1] If you detect a situation where this operation causes excessive memory consumption, you could hold on to the compressed data URL and defer decoding until the point where it is actually

Re: [whatwg] Proposal: downsample while decoding image blobs in createImageBitmap()

2013-12-17 Thread David Flanagan
On 12/17/13 8:36 PM, Rik Cabanier wrote: Hi David, is there a reason why you are completely decoding the image when you create the imageBitmap? [1] I assume that that is the intent of calling createImageBitmap() on a blob. Since JPEG decoding probably takes significantly longer than blocking

Re: [whatwg] Proposal: downsample while decoding image blobs in createImageBitmap()

2013-12-17 Thread Rik Cabanier
On Tue, Dec 17, 2013 at 9:36 PM, David Flanagan dflana...@mozilla.comwrote: On 12/17/13 8:36 PM, Rik Cabanier wrote: Hi David, is there a reason why you are completely decoding the image when you create the imageBitmap? [1] I assume that that is the intent of calling createImageBitmap()

Re: [whatwg] Proposal: downsample while decoding image blobs in createImageBitmap()

2013-12-17 Thread David Flanagan
On 12/17/13 10:55 PM, Rik Cabanier wrote: On Tue, Dec 17, 2013 at 9:36 PM, David Flanagan dflana...@mozilla.com mailto:dflana...@mozilla.com wrote: On 12/17/13 8:36 PM, Rik Cabanier wrote: Hi David, is there a reason why you are completely decoding the image when you