[whatwg] Offscreen canvas (or canvas for web workers).

On Mon, Mar 15, 2010 at 7:05 AM, Maciej Stachowiak <mjs at apple.com> wrote:
> Copying from one canvas to another is much faster than copying to/from
> ImageData. To make copying to a Worker worthwhile as a responsiveness
> improvement for rotations or downscales, in addition to the OffscreenCanvas
> proposal we would need a faster way to copy image data to a Worker. One
> possibility is to allow an OffscreenCanvas to be copied to and from a
> background thread. It seems this would be much much faster than copying via
> ImageData.

Maybe this indicates that implementations of getImageData/putImageData
ought to be optimised? e.g. do the expensive multiplications and
divisions in the premultiplication code with SIMD. (A seemingly
similar thing at http://bugzilla.openedhand.com/show_bug.cgi?id=1939
suggests SSE2 makes things 3x as fast). That would avoid the need to
invent new API, and would also benefit anyone who wants to use
ImageData for other purposes.

-- 
Philip Taylor
excors at gmail.com

Received on Monday, 15 March 2010 03:46:51 UTC