W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] Canvas.getContext error handling

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 12 Apr 2011 02:21:14 -0700
Message-ID: <4DA4198A.2080006@mit.edu>
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.....

-Boris
Received on Tuesday, 12 April 2011 02:21:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT