Re: [whatwg] [2D Canvas] Proposal: Losing and restoring rendering contexts

On Tue, Oct 22, 2013 at 3:07 AM, Mark Callow <callow.mark@artspark.co.jp>wrote:

> I say a weak no to the second. Testing can be done with shims and there
> are probably better ways for apps to do resource management.
>

After doing some digging, I totally agree. I found that the webgl debug
utilities use a shim for testing context losses and it seems to work just
fine for testing web apps.

See makeLostContextSimulatingCanvas defined here:
 https://www.khronos.org/registry/webgl/sdk/debug/webgl-debug.js

That exact same pattern could be replicated for 2D canvas and requires no
additional APIs from the browser.
As far as testing the browser is concerned, implementers can easily add
private APIs to test harnesses, so it is a non-issue.

I think we can close that issue now.

Thanks for the feedback.

    -Justin

Received on Tuesday, 22 October 2013 14:17:16 UTC