I like this model because it corresponds to exactly the double-buffering model and double-buffering is something you need for smooth animation regardless of whether it is 2D or 3D.
Why waste the object? If canvas all have a drawingBuffer then the most commonuse case is to create a context with no drawingBuffer or a 1x1 and then justdraw to the mutliple canvas drawingbuffers. Why the wasted drawingBuffer onthe context if it will rarely if ever be used?
I'm looking at it as each canvas has a drawingBuffer. You can't have a canvasin a worker but you can have a drawingBuffer. Breaking canvas into 2 partssolves that problem. That seems like a clean solution to me. context alwaysdraw to drawingbuffers. They either draw to one from a canvas or one createdexplicitly.
drawingBuffer === back buffer
canvas === front buffer (what is displayed to the user, or in the
web platform case, what is composited and presented to the user)
A worker drawing with a context has no need for a front buffer,
just a place to accumulate drawing.
I certainly don't see this as introducing extra indirection.
NOTE: This electronic mail message may contain confidential and privileged information from HI Corporation. If you are not the intended recipient, any disclosure, photocopying, distribution or use of the contents of the received information is prohibited. If you have received this e-mail in error, please notify the sender immediately and permanently delete this message and all related copies.