summaryrefslogtreecommitdiff
path: root/src/cairo-path-stroke-boxes.c
Commit message (Collapse)AuthorAgeFilesLines
* replace _BSD_SOURCE with _DEFAULT_SOURCEAdrian Johnson2017-09-161-1/+1
| | | | | | fixes the warning: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
* Revert "stroker: Check for scaling overflow in computing half line widths"Uli Schlachter2017-05-131-20/+5
| | | | | This reverts commit 91b25005d62fe4ca178f45d349374e42c29a5e11 because it causes lots of new crashes due to assertion failures.
* stroker: Check for scaling overflow in computing half line widthsChris Wilson2017-05-041-5/+20
| | | | | | | | | | | | | | | Given a combination of a large scaling matrix and a large line, we can easily generate a half line width that is unrepresentable in our 24.8 fixed-point. This leads to spurious errors later, such as generating negative height boxes, and so asking pixman to fill to infinity. To avoid this, we can check for overflow in calculating the half line with, though we still lack adequate range checking on the final stroke path. References: https://bugs.webkit.org/show_bug.cgi?id=16793 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: magomez@igalia.com Tested-by: Bryce Harrington <bryce@osg.samsung.com> Acked-by: Bryce Harrington <bryce@osg.samsung.com>
* stroker: Avoid emitting a miter join for across an elided degenerate segmentChris Wilson2012-08-201-7/+11
| | | | | | | | | | | | | | Given the criteria of the rectlinear stroker that it only handles horizontal and vertical line segments, and eliminates degenerate segments before stroking, we must be careful not to apply a join between two horizontal segments (for example if the intervening vertical segment was degenerate and so elided). A miter join between two colinear segments is empty, yet we were blissfully extending the line caps to cover the join. Fixes: outline-tolerance Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=407107 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* path-stroke-boxes: Fix degenerate end-caps for anti-clockwise pathsChris Wilson2012-04-291-32/+28
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* stroke(boxes): Convert the dash step back into device units before incrementingChris Wilson2012-04-211-1/+1
| | | | | Reported-by: Carlos Garcia Campos <carlosgc@gnome.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Split cairo-box-privates into struct+inlinesChris Wilson2012-04-191-1/+1
| | | | | References: https://bugs.freedesktop.org/show_bug.cgi?id=48577 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* stroke(boxes): Apply user scale factors to dash segmentsChris Wilson2012-04-181-4/+7
| | | | | | | | | Fixes tests/rectilinear-dash-scale* Reported-by: Guillaume Ayoub <xovni@wanadoo.fr> Reported-by: Carlos Garcia Campos <carlosgc@gnome.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48818 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* stroke: Fix misuse of half_line_x for vertical caps on dashesChris Wilson2012-04-081-4/+4
| | | | | | | A typo using half_line_x instead of half_line_y when emitting dashed segments of the rectilinear stroke. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* stroke: Adapt rectilinear stroker to handle separable non-unity scalingChris Wilson2012-03-191-60/+65
| | | | | Reported-by: Christos Sotiriou <csotiriou@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* stroke: Use the tessellator to resolve overlapping strokesChris Wilson2011-09-291-1/+4
| | | | | | | | | | | | If the stroke is too large, the strokes around the box overlap and we fail to generate the canonical form of the boxes. So if we detect that the boxes overlap, feed them through the tessellator to reduce them to canonical form. Fixes line-width-overlap. Based on a patch by Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Introduce a new compositor architectureChris Wilson2011-09-121-24/+66
| | | | | | | | | | | | | | | | | | Having spent the last dev cycle looking at how we could specialize the compositors for various backends, we once again look for the commonalities in order to reduce the duplication. In part this is motivated by the idea that spans is a good interface for both the existent GL backend and pixman, and so they deserve a dedicated compositor. xcb/xlib target an identical rendering system and so they should be using the same compositor, and it should be possible to run that same compositor locally against pixman to generate reference tests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> P.S. This brings massive upheaval (read breakage) I've tried delaying in order to fix as many things as possible but now this one patch does far, far, far too much. Apologies in advance for breaking your favourite backend, but trust me in that the end result will be much better. :)
* stroke: Rely on the tessellator to remove self-intersectionsChris Wilson2011-08-131-0/+658
As handling joins/caps between line segments shorter than half_line_width is tricky. Rather than also fixing the bug in traps, remove that code. The plan is to avoiding hitting the traps code, short-circuiting several steps along the fast rectangular paths. Fixes line-width-overlap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>