[whatwg] remove resetClip from the Canvas 2D spec
senorblanco at chromium.org
Fri Aug 9 13:11:37 PDT 2013
Although Skia could support resetClip() via SkRegion::kReplace_Op, it's
problematic for the API in general, and I think we should avoid it.
In particular, it makes it impossible to place a display list (SkPicture in
Skia parlance) inside a parent display list containing a clip and be
assured that the child will not draw outside the given region, since the
child display list can always resetClip() its way out of the parent's
clip. It probably also prevents culling optimizations for the same reason.
For example, if one used Skia to draw the entirety of a browser UI
including chrome and content, the resetClip() inside the web page contents
would overwrite the browser UI. Obviously we don't do that in Chrome, but
it goes some idea of the problem at the API level.
On Thu, Jul 18, 2013 at 1:39 PM, Ian Hickson <ian at hixie.ch> wrote:
> On Tue, 29 Jan 2013, Rik Cabanier wrote:
> > we were looking at how resetClip 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:
> > http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/10582
> The solution on Mac is probably for Apple to update CoreGraphics to
> support this feature.
> This is a quite widely requested feature.
> > Since no browser has implemented it, can it be removed from the spec?
> It's new, so no browser having implemented it is expected.
> If browsers don't implement it, it'll get removed in due course. But it
> would be sad for authors, who are the main concern here.
> Ian Hickson U+1047E )\._.,--....,'``. fL
> http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
> Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg