W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2009

[whatwg] getImageData/putImageData comments

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 12 Jun 2009 14:47:14 -0400
Message-ID: <4A32A2B2.7000804@mit.edu>
Ian Hickson wrote:
> On Mon, 1 Jun 2009, Boris Zbarsky wrote:
>> I still think that we need a better "I have some externally-derived 
>> pixel data I'd like to just stick in this canvas" API here.  fillRect() 
>> has terrible performance characteristics (as has been brought up many 
>> times before), and the current imagedata design makes it very difficult 
>> to use it correctly for this purpose...
> 
> It's not that hard, it's an extra four or five lines of code to fill in 
> multiple pixels in a square (two nested for-loops and an expression or two 
> to work out what the limit is). Compared to the maths such code would be 
> doing anyway, this is trivial stuff.

The hard part is realizing you have to do it...

-Boris
Received on Friday, 12 June 2009 11:47:14 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:13 UTC