[whatwg] Hardware accelerated canvas

Jonas Sicking jonas at sicking.cc
Wed Sep 5 01:07:36 PDT 2012

On Tue, Sep 4, 2012 at 10:15 AM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> So now our list is:
> 1)  Have a way for pages to opt in to software rendering.
> 2)  Opt canvases in to software rendering via some sort of heuristic
>     (e.g. software by default until there has been drawing to it for
>     several event loop iterations, or whatever).
> 3)  Have a way for pages to opt in to having snapshots taken.
> 4)  Auto-snapshot based on some heuristics.
> 5)  Save command stream.
> 6)  Have a way for pages to explicitly snapshot a canvas.
> 7)  Require opt in for hardware accelerated rendering.
> 8)  Authors use toDataURL() when they want their data to stick around.
> 9)  Context lost event that lets authors regenerate the canvas.
> 10) Do nothing, assume users will hit reload if their canvas goes blank.

11) Default to best-effort (current behavior), but allow opting in to
getting notifications about lost context, in which case the browser
would not need to do various tricks in order to attempt to save the
current state.

I.e. basically 4, but with the ability for the page to opt in to 9.

It sounds like no browsers do any such tricks right now, so
effectively the opt-in would be to just be notified. But possibly
browsers might feel the need to do various snap-shot heuristics on
mobile as they start to hardware accelerate there.

/ Jonas

More information about the whatwg mailing list