<div dir="auto">Dear phil & java2d team,<div dir="auto"><br></div><div dir="auto">I think this PR is good to have asap (jdk19 rdp1 ?) as the fix is trivial : 1 if in the Stroker class (3 lines).</div><div dir="auto"><br></div><div dir="auto">Could you please review the PR asap as I am not an official openjdk reviewer ?</div><div dir="auto"><a href="https://github.com/openjdk/jdk/pull/8943">https://github.com/openjdk/jdk/pull/8943</a><br></div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Laurent</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 3 juin 2022, 00:07, Laurent Bourgès <<a href="mailto:bourges.laurent@gmail.com">bourges.laurent@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Sorry, I corrected 2 typo error:<div dir="auto"><br></div><div dir="auto"><span style="font-size:12.8px">I quickly tested my modified patch with the extra condition and noticed no difference in my tests + fixed the original reproducer code.</span><br></div><div dir="auto"><span style="font-size:12.8px"><br></span></div><div dir="auto"><span style="font-size:12.8px">Laurent</span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 3 juin 2022, 00:00, Laurent Bourgès <<a href="mailto:bourges.laurent@gmail.com" target="_blank" rel="noreferrer">bourges.laurent@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hi Jeremy,<div dir="auto"><br></div><div dir="auto">I quickly tested my modified path with the extra condition and noticed so difference in my tests + fixed the original reproducer code.</div><div dir="auto"><br></div><div dir="auto">It is quite trivial ~ 3 lines in Stroker so it seems doable to release this fix on time.</div><div dir="auto"><br></div><div dir="auto">I will look at your test code and see how to test few more cases : quad(..., end) + lineto(end) and cubicto(..., end) + lineto(end).</div><div dir="auto"><br></div><div dir="auto">Anyway this looks good to fix.</div><div dir="auto"><br></div><div dir="auto">Let's see if phil or anybody else has a slot for a simple review next week.</div><div dir="auto"><br></div><div dir="auto">Roadmap:</div><div dir="auto"><a href="https://openjdk.org/projects/jdk/19/" rel="noreferrer noreferrer" target="_blank">https://openjdk.org/projects/jdk/19/</a><br></div><div dir="auto"><br></div><div dir="auto">Deadline for integration is june 9th.</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Laurent</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 2 juin 2022, 23:36, Jeremy Wood <<a href="mailto:mickleness@gmail.com" rel="noreferrer noreferrer" target="_blank">mickleness@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Laurent,<br>
<br>
I made a very modest PR here:<br>
<br>
<a href="https://github.com/openjdk/jdk/pull/8943" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://github.com/openjdk/jdk/pull/8943</a><br>
<br>
I wasn’t aware there was a deadline coming up; thanks for letting me <br>
know.<br>
<br>
This passes my current test, but depending on code review feedback it’s <br>
hard to predict if this will be ready by next week.<br>
<br>
- Jeremy<br>
<br>
------ Original Message ------<br>
>From "Laurent Bourgès" <<a href="mailto:bourges.laurent@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">bourges.laurent@gmail.com</a>><br>
To "Jeremy Wood" <<a href="mailto:mickleness@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">mickleness@gmail.com</a>><br>
Cc <a href="mailto:client-libs-dev@openjdk.java.net" rel="noreferrer noreferrer noreferrer" target="_blank">client-libs-dev@openjdk.java.net</a><br>
Date 6/2/2022 4:48:25 PM<br>
Subject Re: Re[2]: Any interest in JDK-8264999 (stroke miter edge case <br>
in Marlin)<br>
<br>
>Jeremy,<br>
><br>
>I hope you are doing well.<br>
><br>
>As jdk9 rdp1 is next week, do you plan this bug to be ready for this <br>
>short window or not ?<br>
><br>
>Laurent<br>
><br>
>Le dim. 29 mai 2022, 09:31, Laurent Bourgès <<a href="mailto:bourges.laurent@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">bourges.laurent@gmail.com</a>> <br>
>a écrit :<br>
>>One more general comment on this bug:<br>
>>what is expected when lineTo() does not change last point after all <br>
>>other possible operations ?<br>
>>- lineTo, lineto (this bug)<br>
>>- quadTo, lineto<br>
>>- cubicTo, lineto<br>
>>- moveto, lineto: point (ok)<br>
>>- close, lineto(star: equiv to close, move start, lineto start: point <br>
>>start (ok ?)<br>
>><br>
>>If any drawing operation in progress (lineto, quadto, curveto), then <br>
>>skip repeated end point is the specified behaviour.<br>
>><br>
>>Laurent<br>
>><br>
>>Le mer. 25 mai 2022, 08:57, Laurent Bourgès <br>
>><<a href="mailto:bourges.laurent@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">bourges.laurent@gmail.com</a>> a écrit :<br>
>>>In Stroker, this lines seems causing the problem:<br>
>>><a href="https://github.com/openjdk/jdk/blob/a0cccb54791d954bf08da5aac9b9794e370617c8/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java#L568" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://github.com/openjdk/jdk/blob/a0cccb54791d954bf08da5aac9b9794e370617c8/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java#L568</a><br>
>>><br>
>>>If delta is 0, then tangent is (1, 0) !<br>
>>>Should be:<br>
>>>If drawOp was lineTo and delta is 0, return (skip).<br>
>>><br>
>>>I wonder if there are other renderer suffering the same problem.<br>
>>>Phil, how could we generalize this kind of path operation filtering ?<br>
>>><br>
>>>My 2 cents,<br>
>>>Laurent<br>
>>><br>
>>>Le mer. 25 mai 2022, 08:15, Laurent Bourgès <br>
>>><<a href="mailto:bourges.laurent@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">bourges.laurent@gmail.com</a>> a écrit :<br>
>>>>Jeremy,<br>
>>>><br>
>>>>Probably your fix could be plugged in marlin pathTo() :<br>
>>>><a href="https://github.com/openjdk/jdk/blob/742644e291039e4f2f30cf80718669c06da5809c/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java#L768" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://github.com/openjdk/jdk/blob/742644e291039e4f2f30cf80718669c06da5809c/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java#L768</a><br>
>>>><br>
>>>>Or in Stroker lineTo...<br>
>>>><br>
>>>>Laurent<br>
>>>><br>
>>>>Le mar. 24 mai 2022, 22:55, Jeremy Wood <<a href="mailto:mickleness@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">mickleness@gmail.com</a>> a <br>
>>>>écrit :<br>
>>>>>I may still move it in the Stroker classes. There are a few other <br>
>>>>>things<br>
>>>>>I want to look at, too. This is a very rough draft I put together <br>
>>>>>in<br>
>>>>>under an hour; I just wanted to make sure it was worth pursuing <br>
>>>>>before I<br>
>>>>>put more time into it.<br>
>>>>><br>
>>>>> - Jeremy<br>
>>>>><br>
>>>>><br>
>>>>>------ Original Message ------<br>
>>>>>From "Laurent Bourgès" <<a href="mailto:bourges.laurent@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">bourges.laurent@gmail.com</a>><br>
>>>>>To "Jeremy Wood" <<a href="mailto:mickleness@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">mickleness@gmail.com</a>><br>
>>>>>Cc <a href="mailto:client-libs-dev@openjdk.java.net" rel="noreferrer noreferrer noreferrer" target="_blank">client-libs-dev@openjdk.java.net</a><br>
>>>>>Date 5/24/2022 4:35:21 PM<br>
>>>>>Subject Re: Any interest in JDK-8264999 (stroke miter edge case in<br>
>>>>>Marlin)<br>
>>>>><br>
>>>>> >Thanks Jereremy for the notification I was not aware of this one.<br>
>>>>> ><br>
>>>>> >I wonder if the problem should be fixed inside the marlin renderer<br>
>>>>> >Stroker that should ignore such useless lineTo...<br>
>>>>> ><br>
>>>>> >I will read your code and try to figure out potential causes in <br>
>>>>>stroker<br>
>>>>> >and give you my feedback.<br>
>>>>> ><br>
>>>>> >Laurent<br>
>>>>> ><br>
>>>>> >Le mar. 24 mai 2022, 19:52, Jeremy Wood <<a href="mailto:mickleness@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">mickleness@gmail.com</a>> a <br>
>>>>>écrit<br>
>>>>> >:<br>
>>>>> >>This is a P3 ticket currently assigned to Philip Race:<br>
>>>>> >><a href="https://bugs.openjdk.java.net/browse/JDK-8264999" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://bugs.openjdk.java.net/browse/JDK-8264999</a><br>
>>>>> >><br>
>>>>> >>If I put together a PR: Is anyone available/willing to help <br>
>>>>>review it?<br>
>>>>> >><br>
>>>>> >>I made a rough draft<br>
>>>>> >><<a href="https://github.com/openjdk/jdk/compare/master...mickleness:JDK-8264999?expand=1" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://github.com/openjdk/jdk/compare/master...mickleness:JDK-8264999?expand=1</a>><br>
>>>>> >>of a potential solution last night. I can continue to work on <br>
>>>>>this, or<br>
>>>>> >>I<br>
>>>>> >>can move on if the interest isn’t there.<br>
>>>>> >><br>
>>>>> >>(No urgency at all.)<br>
>>>>> >><br>
>>>>> >>Regards,<br>
>>>>> >> - Jeremy<br>
>>>>> >><https://><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>