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

Laurent Bourgès bourges.laurent at gmail.com
Thu Jun 2 22:00:50 UTC 2022


Hi Jeremy,

I quickly tested my modified path with the extra condition and noticed so
difference in my tests + fixed the original reproducer code.

It is quite trivial ~ 3 lines in Stroker so it seems doable to release this
fix on time.

I will look at your test code and see how to test few more cases :
quad(..., end) + lineto(end) and cubicto(..., end) + lineto(end).

Anyway this looks good to fix.

Let's see if phil or anybody else has a slot for a simple review next week.

Roadmap:
https://openjdk.org/projects/jdk/19/

Deadline for integration is june 9th.

Cheers,
Laurent

Le jeu. 2 juin 2022, 23:36, Jeremy Wood <mickleness at gmail.com> a écrit :

> Laurent,
>
> I made a very modest PR here:
>
> https://github.com/openjdk/jdk/pull/8943
>
> I wasn’t aware there was a deadline coming up; thanks for letting me
> know.
>
> This passes my current test, but depending on code review feedback it’s
> hard to predict if this will be ready by next week.
>
>   - 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 6/2/2022 4:48:25 PM
> Subject Re: Re[2]: Any interest in JDK-8264999 (stroke miter edge case
> in Marlin)
>
> >Jeremy,
> >
> >I hope you are doing well.
> >
> >As jdk9 rdp1 is next week, do you plan this bug to be ready for this
> >short window or not ?
> >
> >Laurent
> >
> >Le dim. 29 mai 2022, 09:31, Laurent Bourgès <bourges.laurent at gmail.com>
> >a écrit :
> >>One more general comment on this bug:
> >>what is expected when lineTo() does not change last point after all
> >>other possible operations ?
> >>- lineTo, lineto (this bug)
> >>- quadTo, lineto
> >>- cubicTo, lineto
> >>- moveto, lineto: point (ok)
> >>- close, lineto(star: equiv to close, move start, lineto start: point
> >>start (ok ?)
> >>
> >>If any drawing operation in progress (lineto, quadto, curveto), then
> >>skip repeated end point is the specified behaviour.
> >>
> >>Laurent
> >>
> >>Le mer. 25 mai 2022, 08:57, Laurent Bourgès
> >><bourges.laurent at gmail.com> a écrit :
> >>>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