<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:sixtysix@inwind.it" title="Massimo <sixtysix@inwind.it>"> <span class="fn">Massimo</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Segmentation fault when using a complex path for clip and stroke"
href="https://bugs.freedesktop.org/show_bug.cgi?id=74779">bug 74779</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #105530 is obsolete</td>
<td>
</td>
<td>1
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Segmentation fault when using a complex path for clip and stroke"
href="https://bugs.freedesktop.org/show_bug.cgi?id=74779#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Segmentation fault when using a complex path for clip and stroke"
href="https://bugs.freedesktop.org/show_bug.cgi?id=74779">bug 74779</a>
from <span class="vcard"><a class="email" href="mailto:sixtysix@inwind.it" title="Massimo <sixtysix@inwind.it>"> <span class="fn">Massimo</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=106407" name="attach_106407" title="proposed patch">attachment 106407</a> <a href="attachment.cgi?id=106407&action=edit" title="proposed patch">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=74779&attachment=106407'>[review]</a>
proposed patch
The attached patch achieves the same result (processing events in a
valid order) by including the approximation of the intersection
coordinates in the event->point member.
It is thus easy to adjust the event comparison function to avoid
that intersection events having y coordinate approximated in default
are processed before start events having that same exact y.
To simplify the rounding computation it exploits the fact that in
intersect_lines den_det is always positive, because intersect_lines
is only called after _slope_compare returned > 0 and _slope_compare
is returning the sign of den_det.
And it also simplifies _cairo_bo_edge_contains_intersect_point because
comparing at top is useless as it is explained in the comment and the
quadratic-time finder mentioned there is only present (but unusable) in
src/cairo-bentley-ottman.c, whereas the comparison at bottom is necessary
when edge.p2.y != edge.bottom, but comparing only the y is sufficient.
On my laptop running:
DISPLAY=:2 make -s test TARGETS=image,xlib,xcb
reports the same number of failures with/without the patch and also
replicating the changes in the patch to
src/cairo-{bentley-ottman,polygon-reduce}.c
Well the big number of failures in the test suite could hide newly
introduced bugs, so considering the target image.argb32
tests executing intersection_sweep (in src/cairo-polygon-intersect.c) are
bug-bo-ricotz clip-disjoint clip-disjoint-hatching clip-disjoint-quad
clip-stroke-unbounded clip-fill-nz-unbounded clip-fill-eo-unbounded
clip-fill clip-group-shapes-circles clip-operator clip-polygons
clip-stroke clip-twice hatchings random-clip record90-paint-alpha-clip-mask
rotated-clip tighten-bounds trap-clip
of which only trap-clip and clip-operator are failing here, so anyway the
test-suite is exercising and verifying the code modified.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>