[webkit-dev] Changes related to <canvas>

David Hyatt hyatt at apple.com
Wed Apr 16 12:58:11 PDT 2008


This is a heads up to let people know that the way <canvas> draws is  
going to be changing soon.  Right now <canvas> uses two methods on  
GraphicsContext to draw:

paintBuffer
drawImage (ImageBuffer version)

I recently added a cross-platform Image* accessor (image()) to  
ImageBuffer.  However this has only been implemented on the CG port so  
far.

<canvas> is going to switch over to just grabbing an Image* from the  
ImageBuffer.  This will eliminate the need for these extra methods on  
GraphicsContext.

Every port will need to support the image() accessor on ImageBuffer  
for the new CSS Gradients feature to work also.  Cairo, Qt and wx  
ports should go ahead and get this method implemented now.

There will be more changes coming down the line as canvas is molded to  
be more cross-platform so that we can all share more code and reduce  
duplication of effort.

Thanks,
dave
(hyatt at apple.com)



More information about the webkit-dev mailing list