RE: [Canvas] proposal for supportsContext

This has been filed as https://www.w3.org/Bugs/Public/show_bug.cgi?id=19677 

This looks like a reasonable proposal and a good addition to the spec.

-----Original Message-----
From: Dean Jackson [mailto:dino@apple.com] 
Sent: Tuesday, September 11, 2012 10:38 AM
To: Frank Olivier
Cc: Travis Leithead; Robin Berjon; public-html@w3.org
Subject: Re: [Canvas] proposal for supportsContext


On Sep 11, 2012, at 10:14 AM, Frank Olivier <Frank.Olivier@microsoft.com> wrote:

> Why not (internally) defer context creation until the author calls a method that needs an actual context?

That would be extremely problematic. It could be that by the time the user decides to use the context, it is no longer possible to create one (say we've run out of memory). Now they have a non-null defined reference to something that can't exist.

> (This would be somewhat similar to deferring creation of your media engine & codecs until the author calls video.play() )

We try to do that for video as much as possible. It's not as easy at it seems. We nearly always have to fire up our media engine well before the user starts to play. (e.g. to load the metadata, or to decide if we can play the format).

Dean

Received on Thursday, 25 October 2012 16:37:04 UTC