[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Extension proposal: WEBGL_lose_context

On Tue, Dec 7, 2010 at 3:31 PM, Adrienne Walker <enne@google.com> wrote:
El día 7 de diciembre de 2010 13:59, Gregg Tavares (wrk)
<gman@google.com> escribió:
> This extension can be implemented entirely in _javascript_
> Just wrap the context and add the functions loseContext and restoreContext
> that stop the functions from doing anything and return LOST_CONTEXT.
> Adding an extension for this doesn't seem like it would add anything over
> the pure _javascript_ solution does it?

I considered that approach, but an extension makes it possible to have
a conformance test that verifies that the WebGL context returns the
correct values during a lost context and correctly invalidates old
resources after the context is restored.  You can't test the WebGL
implementation itself with a pure _javascript_ implementation.

I don't see how that's true. For all you know it only returns the correct values when the extension is enabled.

If this is about testing it seems like you should just make up your own extension "CHROMIUM_lost_context_for_testing"
It's just a bonus that app developers could also use this extension
for their own testing without having to write their own (hopefully
correct) version.

They're going to have to write code to use the extension. They're going to have to write code to check losing the context at various places in their code. So do see how this is much of a win.