Bug 39675

Summary: [bisected] polygon clipper (?) bug
Product: cairo Reporter: ojab <ojab>
Component: xcb backendAssignee: Uli Schlachter <psychon>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.10.3   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: screenshot

Description ojab 2011-07-29 11:42:55 UTC
After commit

commit 6b3e5cd39c81941a73ed709eadf8beae5407dc05
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jul 20 14:32:10 2011 +0100

    xcb: Reduce one pass for masking, now just 2 passes required!
    
    Another 10% off fishbowl for both snb and pnv.
    
    [Note this exposes the bugs in the polygon clipper; naive *and* broken.]
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


I have next (still invisible) line from the bottom on the top of webpage in firefox (please chec the attached screenshot). It appears during scrolling and goes away after redraw. For example, it can be easily  reproduced on page
http://cacm.acm.org/magazines/2011/8/114933-the-robustness-principle-reconsidered/fulltext

Sorry for ambiguous summary.
Comment 1 ojab 2011-07-29 11:43:17 UTC
Created attachment 49726 [details]
screenshot
Comment 2 Chris Wilson 2011-07-29 12:05:16 UTC
We fixed one related bug:

commit cac96c8083214f8e5aa65e9a527f9fa3e813b149
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jul 27 17:02:53 2011 +0100

    polygon: Fix clipping of edges outside of their range
    
    Uli Schlachter analysed the error behind the polygon reduction and
    discovered that it was due to the clipping of a line which intersects
    the clip box (p1, p2) but is range limited by (top, bottom) to be inside
    the clip box.
    
    Fixes hatching
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


commit d7abdab931c1219314c07c0ecf21b0afef19108a
Author: Andrea Canciani <ranma42@gmail.com>
Date:   Wed Jul 27 18:58:03 2011 +0200

    polygon: Fix generic case of edge clipping
    
    The edge clipper is more complicated than it should be and contains a
    subtle bug: when an edge is almost horizontal, it is always considered
    as having a positive slope.
    
    Explain what should be done and do it in a simpler way.
    
    Fixes horizontal-clip.

does this fix yours? If not we need another test case...
Comment 3 ojab 2011-07-29 12:10:28 UTC
Screenshot was taken on latest git:
HEAD is now at 2342e4d image: extend support of direct replay for paginated surfaces
Comment 4 ojab 2011-08-02 20:34:40 UTC
Still the same with
HEAD is now at 7b5b29c xcb: Handle deferred clear in _upload_image_inplace
Comment 5 ojab 2011-08-06 05:32:28 UTC
Still happens with cairo git-61c0f67.
Comment 6 ojab 2011-08-19 09:07:14 UTC
cannot reproduce with latest git

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.