W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2013

Re: [whatwg] Proposal: ImageData constructor or factory method with preexisting data

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 12 Mar 2013 00:52:34 -0400
Message-ID: <513EB492.8000003@mit.edu>
To: whatwg@lists.whatwg.org
On 3/11/13 11:58 PM, Rik Cabanier wrote:
>> If there are use cases for creating an ImageData, I recommend not making a
>> copy, so all this is doing is taking an existing ArrayBuffer and creating a
>> thin wrapper around the same buffer.
> I think that would make implementations that defer rendering much more
> complex and slower. (It would force putImage to execute immediately since
> it doesn't know if the buffer will change in JS)

You never know this anyway with an ImageData, since the data inside it 
can be mutated from JS.  So any existing implementation of putImageData 
must copy the data immediately or do COW or somehow prove that the data 
won't be mutated in JS or something.

Received on Tuesday, 12 March 2013 04:53:00 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:20 UTC