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

Re: [whatwg] Grouping in canvas 2d

From: Justin Novosad <junov@google.com>
Date: Tue, 18 Jun 2013 10:25:44 -0400
Message-ID: <CABpaAqTdv4TaDpXj4jksL+jeDVqv9cKyVvxJO1nridR9Zwq66Q@mail.gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: WHAT Working Group <whatwg@whatwg.org>, public-canvas-api@w3.org, Brian Salomon <bsalomon@chromium.org>
On Fri, Jun 14, 2013 at 2:34 PM, Rik Cabanier <cabanier@gmail.com> wrote:
> I think so. If you leave a layer 'open', what would you display.
> It wouldn't just be for requestAnimationFrame, you would also need to
> define what happens if you read pixels with getImageData inside a
> beginLayer.
I would like to suggest that all layers left 'open' should be automatically
closed at the end of a script execution task.  Otherwise, it would be too
easy to leak layers and get OOM crashes. This would also guarantee that the
canvas contents are in a ready to display state.

For the getImageData question I think the options that would make most
sense are either:
a) Read from the root layer (up to date except for contents of currently
open layers),
b) Read from the current (top most) layer, or
c) Fail
These options will never require the compositing of open (potentially
unfinished) layers, which I think is important for implementations to be
I am not sure which of the above makes more sense though.
Received on Tuesday, 18 June 2013 14:26:18 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:22 UTC