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.....

Received on Tuesday, 12 April 2011 02:21:14 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:05 UTC