Any interest in JDK-8264999 (stroke miter edge case in Marlin)

Laurent Bourgès bourges.laurent at gmail.com
Wed May 25 06:57:01 UTC 2022


In Stroker, this lines seems causing the problem:
https://github.com/openjdk/jdk/blob/a0cccb54791d954bf08da5aac9b9794e370617c8/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java#L568

If delta is 0, then tangent is (1, 0) !
Should be:
If drawOp was lineTo and delta is 0, return (skip).

I wonder if there are other renderer suffering the same problem.
Phil, how could we generalize this kind of path operation filtering ?

My 2 cents,
Laurent

Le mer. 25 mai 2022, 08:15, Laurent Bourgès <bourges.laurent at gmail.com> a
écrit :

> Jeremy,
>
> Probably your fix could be plugged in marlin pathTo() :
>
> https://github.com/openjdk/jdk/blob/742644e291039e4f2f30cf80718669c06da5809c/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java#L768
>
> Or in Stroker lineTo...
>
> Laurent
>
> Le mar. 24 mai 2022, 22:55, Jeremy Wood <mickleness at gmail.com> a écrit :
>
>> I may still move it in the Stroker classes. There are a few other things
>> I want to look at, too. This is a very rough draft I put together in
>> under an hour; I just wanted to make sure it was worth pursuing before I
>> put more time into it.
>>
>>   - Jeremy
>>
>>
>> ------ Original Message ------
>> From "Laurent Bourgès" <bourges.laurent at gmail.com>
>> To "Jeremy Wood" <mickleness at gmail.com>
>> Cc client-libs-dev at openjdk.java.net
>> Date 5/24/2022 4:35:21 PM
>> Subject Re: Any interest in JDK-8264999 (stroke miter edge case in
>> Marlin)
>>
>> >Thanks Jereremy for the notification I was not aware of this one.
>> >
>> >I wonder if the problem should be fixed inside the marlin renderer
>> >Stroker that should ignore such useless lineTo...
>> >
>> >I will read your code and try to figure out potential causes in stroker
>> >and give you my feedback.
>> >
>> >Laurent
>> >
>> >Le mar. 24 mai 2022, 19:52, Jeremy Wood <mickleness at gmail.com> a écrit
>> >:
>> >>This is a P3 ticket currently assigned to Philip Race:
>> >>https://bugs.openjdk.java.net/browse/JDK-8264999
>> >>
>> >>If I put together a PR: Is anyone available/willing to help review it?
>> >>
>> >>I made a rough draft
>> >><
>> https://github.com/openjdk/jdk/compare/master...mickleness:JDK-8264999?expand=1
>> >
>> >>of a potential solution last night. I can continue to work on this, or
>> >>I
>> >>can move on if the interest isn’t there.
>> >>
>> >>(No urgency at all.)
>> >>
>> >>Regards,
>> >>   - Jeremy
>> >><https://>
>>
>



More information about the client-libs-dev mailing list