[whatwg] Canvas size and double buffering.

Oliver Hunt oliver at apple.com
Wed Feb 3 11:23:16 PST 2010

On Feb 3, 2010, at 10:01 AM, Tim Hutt wrote:

> On 3 February 2010 17:45, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>> On 2/3/10 12:22 PM, Tim Hutt wrote:
>>> Yes it should be cleared and there should be a oncanvasresize() callback.
>> What uses cases does this cover that are not covered by a general resize
>> event?
> Good point, it would be better to call it 'onresize' for consistency.
> So my revised suggestion is:
> 1. Support more length specifiers for the width and height of a
> canvas(%, em, etc.).

This doesn't really make sense for the backing buffer as it is logically defined in terms of pixel.

> 2. Add an onresize event to the canvas tag. When the canvas is resized
> it is reset and this event is fired.
We actually need this for webgl as well.

> 3. CSS size specifiers resize rather than scale the canvas. I.e. it
> should always be that 1 unit = 1 pixel initially.
This would break content

More information about the whatwg mailing list