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

Maciej Stachowiak mjs at apple.com
Tue Feb 23 21:57:34 PST 2010


On Feb 23, 2010, at 7:40 AM, Jeremy Orlow wrote:

>
> Note that doing rendering in a worker and then displaying it on the  
> the main thread also gives you double buffering for no additional  
> cost.  This is something our teams are excited about as well.

While I think the use cases presented for background thread image  
manipulation are valid, I'm confused about this claim:

(A) <canvas> implementations do double-buffering anyway, to avoid  
drawing intermediate states in the middle of JS execution.
(B) If you want triple-buffering (maybe you want to use multiple event  
loop cycles to draw the next frame), you don't need a Worker to do it.  
You can


BTW some examples of shipping pixels being much less shipping drawing  
commands:

- Raytracing a complex scene at high resolution.
- Drawing a highly zoomed in high resolution portion of the Mandelbrot  
set.

To be fair though, you could compute the pixels for those with just  
math, there is no need to have a graphics context type abstraction.

Regards,
Maciej




More information about the whatwg mailing list