[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] using the same context with multiple canvases



On Sat, 10 Nov 2012, Gregg Tavares (社~T) wrote:
>
> What does the proxy object add?

My reasoning for transfering the proxy and not the context itself is that 
contexts have a _lot_ of state and it seemed like a recipe for bugs to 
require that UAs be able to transfer all that state from process to 
process, especially since really there isn't much of a use case for 
actually transferring all that state; all you really need to transfer is 
the painting authority, and you only really need to do that until you have 
established who's going to do the painting.

It also allows you to transfer a canvas to a worker and then have two 
different rendering contexts alternately bind to the canvas, and allows 
you to create contexts without a canvas and then later bind them without 
losing the ability to paint on them. By transferring the context rather 
than a proxy for the canvas, you are forced to only be able to bind the 
context in the main thread.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'