W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2014

Re: [whatwg] Canvas-Only Document Type

From: Justin Novosad <junov@google.com>
Date: Mon, 7 Jul 2014 17:17:41 -0400
Message-ID: <CABpaAqRg5s-ER_n7KJNYgtTEgAwc-uCD=qB7Z_ZQYqug8F46Ug@mail.gmail.com>
To: Brian Blakely <anewpage.media@gmail.com>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>
Do you have any data to back the proposal? For example, how much overhead
do you expect this to save compared to a document that contains just a
full-screen canvas? Is the HTML parsing, style calculation and DOM layout
overhead really that high for a document that has nothing but a canvas
element in it?  If it is, perhaps that can be optimized without changing
the spec.

On Mon, Jul 7, 2014 at 4:35 PM, Brian Blakely <anewpage.media@gmail.com>

> Floating a concept for a document mode which eschews CSS and the DOM
> to enable a more jank-free Canvas surface.
> Depending on how this allows for optimization, might be used well for
> games, VR, wearables, and ultra-portable or high-performance apps.
> Probably most beneficial to memory usage and first paint time.  Would
> appreciate if some vendor engineers who might be reading could chime
> in on this point.
> Strawman:
> Document only contains <!doctype canvas-[2d|3d]> and script elements.
> Everything else is ignored.  "document" object is gone.
> A Canvas drawing surface consumes the entire viewport.  It always has
> an opaque backing store, same as specifying getContext('2d', { alpha:
> false }).
> UA provides:
> * A host object representing surface's CanvasRenderingContext2D or
> WebGLRenderingContext (depending on specified doctype).
> * In lieu of DOM, an API for creating offscreen canvases (actually,
> this abstraction should probably exist anyway).  This might live on
> the Context host obj, which may open a beneficial performance
> relationship between onscreen canvas and offscreen "children".
Received on Monday, 7 July 2014 21:18:08 UTC

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