Re: [whatwg] remove resetClip from the Canvas 2D spec

I opened the bug about this originally back in 2011, asking that it be
added (it was in March 2012 to the WHATWG spec). For the sake of the
discussion that bug is here:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=14499

The reason is that (almost) every single piece of canvas context state can
be reset on its own (ie, to reset the fillStyle: ctx.fillStyle = 'black')

Yet the only part of the context state that cannot be reset on its own is
the clipping region. For this to be reset you must use save and restore,
which affect all state and are to be avoided in performance-minded
applications (games, diagramming libraries, etc).

So from a heavy canvas-user's perspective resetClip() has a definite
utility. On the other hand I can't comment on difficulty of implementation.


On Tue, Jan 29, 2013 at 8:00 PM, Rik Cabanier <cabanier@gmail.com> wrote:

> All,
>
> we were looking at how resetClip [1] could be implemented in WebKit.
> Looking over the Core Graphics implementation, this feature can't be
> implemented without significant overhead. I also found an email from 2007
> where Maciej states the same concern. [2]
>
> Since no browser has implemented it, can it be removed from the spec?
>
> Rik
>
> 1:
>
> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-resetclip
> 2: http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/10582
>

Received on Wednesday, 30 January 2013 01:12:32 UTC