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

Re: [Public WebGL] getContext multiple context language

Apologies for my delayed response. I took a week off.

The language is fine up until the last paragraph.

Vladimir Vukicevic wrote:
Here's the language for getContext() -- let me know of any suggestions before I send it off to hixie:

If multiple rendering contexts are active, they all render to the same canvas; they are not layered or otherwise isolated.  Changes made to the canvas with one context must be immediately visible to any other active contexts on the canvas.  It is up to the implementation to manage synchronization issues associated with rendering with different contexts to the same canvas.
Implicit synchronization is fraught with problems as I have stated many times before during this discussion. Lack of explicit synchronization is a nightmare for implementers (with the tangled web of checks between contexts growing as each new context type is added) and will encourage developers to interleave calls in ways that will be horrendously inefficient on any hardware that is attempting parallelism, which these days is pretty much everything.

An explicit waitContext(in DOMString contextId) function should be added to the canvas for synchronization between contexts. This would flush commands previously issued to "contextId" and wait for them to complete and would be required between calls to drawing commands of different contexts.


fn:Mark Callow
org:HI Corporation;Graphics Lab, Research & Development
adr:Higashiyama 1-4-4, Meguro-ku;;Meguro Higashiyama Bldg 5F;Tokyo;;153-0043;Japan
title:Chief Architect
tel;work:+81 3 3710 9367 x228
tel;fax:+81 3 5773 8660
url:http://www.hicorp.co.jp,  http://www.mascotcapsule.com