[gsoc] webdraw - alphadraw

From: David Hoskin <root@davidrhoskin.com>
To: plan9-gsoc@googlegroups.com
Date: Wed, 9 Jul 2014 12:54:17 -0700 (PDT)
Subject: [gsoc] webdraw - alphadraw

Hi again, it's been a while!

I implemented alphadraw() using the actual pixel values rather than
just calling the canvas drawing operation. It calls canvas'
getImageData() for each of the src, dst, and mask images every time it
is invoked, which is relatively expensive. However, now that
alphadraw() is used for almost everything, there is no reason to keep
images as canvases. For now I'm still using a canvas and caching the
getImageData(), but once my own memlayer(2) is working well enough
that I can do away with the hack of positioning canvases with CSS to
represent windows, I will be able to remove the canvases entirely.

Right now I'm working to remove corruption that results from drawing
an image onto itself, which occurs when scrolling windows in rio.

-- David