[OpenJDK 2D-Dev] RFR 8144718: Pisces / Marlin Strokers may generate invalid curves with huge coordinates and round joins
Laurent Bourgès
bourges.laurent at gmail.com
Sat Dec 5 16:33:28 UTC 2015
Jim,
here is the updated webrev:
http://cr.openjdk.java.net/~lbourges/marlin/Stroker-8144718.1/
Changes:
- added the comment you proposed
- Marlin: use precomputed invHalfLineWidth2Sq = 1f / (2f * lineWidth2 *
lineWidth2) for performance
- fix copyright date in Pisces Stroker
Laurent
2015-12-05 0:00 GMT+01:00 Jim Graham <james.graham at oracle.com>:
> I'd make the test >= 0.5 since 0.5 generates a flat curve as well.
>
> And it couldn't hurt to mention that we are worried about round off error
> since someone coming along might wonder why we're worried that a cos() is >
> 1:
>
> // check round off errors producing cos(ext) > 1 and a NaN below
> // cos(ext) == 1 implies colinear segments and an empty join anyway
>
> ...jim
>
>
> On 12/4/15 8:33 AM, Laurent Bourgès wrote:
>
>> Hi,
>>
>> Please review this webrev fixing the Stroker bug in both Pisces &
>> Marlin (same changes):
>> bug: https://bugs.openjdk.java.net/browse/JDK-8144718
>> webrev: http://cr.openjdk.java.net/~lbourges/marlin/Stroker-8144718.0/
>>
>> As this bug is very difficult to reproduce (artefacts), I just provide a
>> simple test class that reproduces the issue.
>>
>> Regards,
>> Laurent Bourgès
>>
>
--
--
Laurent Bourgès
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20151205/1da1287e/attachment.html>
More information about the 2d-dev
mailing list