[whatwg] Canvas.getContext error handling
bzbarsky at MIT.EDU
Tue Apr 12 02:21:14 PDT 2011
On 4/12/11 12:06 AM, Ian Hickson wrote:
>> Now, that's a problem for WebGL, because it's not possible to tell in
>> advance whether the underlying rendering context can be created.
> It would be helpful if someone could explain what conditions could lead to
> a situation where getContext() could fail to return a WebGL context.
In at least Gecko's implementation, creating of an actual GLContext to
back the WebGL context could fail. Unfortunately, this can happen any
time too many WebGL contexts are live; what "too many" means depends on
the exact GPU resources available.
I think we consider the fact that part a quality of implementation
issue, though we haven't figured out how to do the "high quality" think
here yet. ;)
> Is it something the author can do anything about
Still in Gecko's case, drop references to some GL contexts and canvases,
and hope for GC to happen.....
More information about the whatwg