Re: [whatwg] Canvas.getContext error handling

2011-05-12 Thread Ian Hickson
On Thu, 12 May 2011, Cedric Vivier wrote: > > Thanks for your thorough reply and overview of the issue. > > In case it slipped through your inbox, I've posted a more up-to-date > (wrt WebGL WG discussions) and actionable proposal at : > http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-Ma

Re: [whatwg] Canvas.getContext error handling

2011-05-11 Thread Glenn Maynard
On Thu, May 12, 2011 at 2:42 AM, Ian Hickson wrote: > On Wed, 13 Apr 2011, Glenn Maynard wrote: > > Calling canvas.getContext("webgl", {async: true}) will cause it to > > discouraged from using this API (deprecating it if possible). > (FYI: while some people have expressed interest in async init

Re: [whatwg] Canvas.getContext error handling

2011-05-11 Thread Ian Hickson
To summarise this thread: WebGL has the unfortunate problem of being likely to run into hardware limitations more often that most other features, due to limited GPU resources. Authors need to be able to distinguish the temporary failure of a context not being immediately available from the perm

Re: [whatwg] Canvas.getContext error handling

2011-04-14 Thread Glenn Maynard
I forgot that this was all still going to whatwg, instead of public-webgl. We may want to move there. On Thu, Apr 14, 2011 at 12:33 AM, Glenn Maynard wrote: > On Wed, Apr 13, 2011 at 9:01 PM, Kenneth Russell > wrote:Return a new object for contextId > > > Adding support for asynchronous initia

Re: [whatwg] Canvas.getContext error handling

2011-04-13 Thread Glenn Maynard
On Wed, Apr 13, 2011 at 9:01 PM, Kenneth Russell wrote:Return a new object for contextId > Adding support for asynchronous initialization of WebGL is a good > idea, and should be proposed on public_webgl, but this discussion > should focus solely on improving the specification of the existing > sy

Re: [whatwg] Canvas.getContext error handling

2011-04-13 Thread Cedric Vivier
On Thu, Apr 14, 2011 at 09:01, Kenneth Russell wrote: > Adding support for asynchronous initialization of WebGL is a good > idea, and should be proposed on public_webgl, but this discussion > should focus solely on improving the specification of the existing > synchronous initialization path, and

Re: [whatwg] Canvas.getContext error handling

2011-04-13 Thread Kenneth Russell
On Wed, Apr 13, 2011 at 4:43 PM, Glenn Maynard wrote: > On Wed, Apr 13, 2011 at 4:21 PM, Kenneth Russell wrote: >> >> It's essential to be able to report more detail about why context >> creation failed. We have already received a lot of feedback from users >> and developers of popular projects l

Re: [whatwg] Canvas.getContext error handling

2011-04-13 Thread Glenn Maynard
On Wed, Apr 13, 2011 at 4:21 PM, Kenneth Russell wrote: > It's essential to be able to report more detail about why context > creation failed. We have already received a lot of feedback from users > and developers of popular projects like Google Body that doing so will > reduce end user frustrati

Re: [whatwg] Canvas.getContext error handling

2011-04-13 Thread Cedric Vivier
On Wed, Apr 13, 2011 at 05:16, Kenneth Russell wrote: > (...) > To sum up, in general I think that whenever getContext("webgl") > returns null, it's unrecoverable in a high quality WebGL > implementation. Makes sense. Applications could detect all possible context creation failure scenarios with

Re: [whatwg] Canvas.getContext error handling

2011-04-13 Thread Kenneth Russell
On Tue, Apr 12, 2011 at 4:32 PM, Glenn Maynard wrote: > Based on some discussion[1], it looks like a clean way to handle the > "permanent failure" case is: If the GPU is blacklisted, or any other > permanent error occurs, treat "webgl" as an unsupported context.  This means > instead of WebGL's co

Re: [whatwg] Canvas.getContext error handling

2011-04-12 Thread Glenn Maynard
Based on some discussion[1], it looks like a clean way to handle the "permanent failure" case is: If the GPU is blacklisted, or any other permanent error occurs, treat "webgl" as an unsupported context. This means instead of WebGL's context creation algorithm executing and returning null, it would

Re: [whatwg] Canvas.getContext error handling

2011-04-12 Thread Kenneth Russell
On Tue, Apr 12, 2011 at 2:21 AM, Boris Zbarsky wrote: > 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

Re: [whatwg] Canvas.getContext error handling

2011-04-12 Thread Boris Zbarsky
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

Re: [whatwg] Canvas.getContext error handling

2011-04-12 Thread Ian Hickson
On Mon, 11 Apr 2011, Glenn Maynard 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 f

Re: [whatwg] Canvas.getContext error handling

2011-04-11 Thread Glenn Maynard
To confirm the fundamental problem: Canvas.getContext (and the corresponding "Return a new object for *contextId*" algorithm) can never return null. http://krijnhoetmer.nl/irc-logs/whatwg/20110412#l-209 It's intended that calling getContext on a supported context *always* return a context; it

Re: [whatwg] Canvas.getContext error handling

2011-04-11 Thread Kenneth Russell
On Sat, Apr 9, 2011 at 7:55 PM, Glenn Maynard wrote: > getContext doesn't specify error handling.  WebGL solves this oddly: if an > error occurs, it dispatches an event with error details at the canvas.  It's > odd for a synchronous API to report error information with an event; it > would make a

[whatwg] Canvas.getContext error handling

2011-04-09 Thread Glenn Maynard
getContext doesn't specify error handling. WebGL solves this oddly: if an error occurs, it dispatches an event with error details at the canvas. It's odd for a synchronous API to report error information with an event; it would make a lot more sense to raise an exception. However, getContext doe