New issue
Advanced search Search tips

Issue 873 link

Starred by 7 users

Issue metadata

Status: Accepted
Owner: ----
Area: Clipping
NextAction: ----
Priority: Medium
Type: Defect

Sign in to add a comment

clipPath calls far from origin on huge canvases erroneously report empty clip

Project Member Reported by, Sep 14 2012

Issue description

What steps will reproduce the problem?
1. Record a very large picture with a clipPath >2^15 pixels from the origin, with some draws contained in it.
2. Play that picture into a second picture of the same size.
3. Play back the second picture, the contents of that clipPath will be missing (the clipPath call returned false, so the first picture decided to throw out that save/clip/restore block when playing back into the second).

This seems to be a problem with SkRegion's scan-conversion of the path clips not working properly for paths that fall completely outside some limit (seemingly something like 32kx32k). This is only really a problem on *huge* canvases, which are uncommon outside of SkPicture records of large webpages, and render_pictures.
Project Member

Comment 1 by, Sep 14 2012

Project Member

Comment 2 by, Aug 28 2014

Labels: Area-Clipping
Project Member

Comment 3 by, Dec 7 2015

Labels: Hotlist-Fixit
Project Member

Comment 4 by, Feb 26 2016

I'd like to trace through and see what's going on.
Project Member

Comment 5 by, Mar 1 2016

On second thought, I think it would be entirely reasonable to document that the clip is only guaranteed to work within a 2^15 pixel range. I suggest adding this to the SkCanvas::setClip* documentation.

Or maybe, to accommodate this and bugs like maybe somewhere there can be meta documentation that sets the expectation that the device is limited to 2^15 pixels and that all device features also have that range?
Project Member

Comment 6 by, Mar 2 2016

Perhaps this will overlap with a different task I'm looking at : changing AA supersample size. This, in turn, is likely going to force me to actually implement path-tiling, so we can process a large path in chunks (tiles), keeping each chunk inside fixed-point range (for our edgelist).
Project Member

Comment 7 by, Mar 6 2018

Owner: ----

Sign in to add a comment