W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2013

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

From: Justin Novosad <junov@google.com>
Date: Tue, 22 Oct 2013 10:16:48 -0400
Message-ID: <CABpaAqQdB5wJJX4F1FRW0Zm9ByK0YgS3z5eP4MaEK12fktcFQA@mail.gmail.com>
To: Mark Callow <callow.mark@artspark.co.jp>
Cc: WHAT Working Group <whatwg@whatwg.org>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:12 UTC