RFR: 8264999: GeneralPath.lineTo() to itself produces jagged lines [v2]
Laurent Bourgès
lbourges at openjdk.java.net
Thu Jun 9 20:51:02 UTC 2022
On Thu, 9 Jun 2022 02:16:45 GMT, Jeremy <duke at openjdk.java.net> wrote:
>> Previously when you drew a line that moved exactly (+0, +0) with a miter stroke the Stroker class acted like a horizontal miter was appropriate. Now we abort instead, so no miter is applied.
>>
>> The new unit test tests the original steps plus several variations.
>>
>> I'm a little nervous about this change because it looks like someone previously considered this exact condition and implemented a different behavior. I don't think I understand the original rationale.
>
> Jeremy has updated the pull request incrementally with one additional commit since the last revision:
>
> JDK-8264999: GeneralPath.lineTo() to itself produces jagged lines
>
> Adding "&& prev == DRAWING_OP_TO" per Laurent's code review.
>
> I also redid the unit tests. Before this change, with the new unit tests: one scenario failed. With this change: four scenarios failed.
>
> For now I've commented out the failing tests. The failing tests are not the same as the original bug; they are related considerations we should also test against, but IMO they are not essential for the resolution of jdk-8264999.
Jeremy,
I fixed the bug in the marlin renderer repository, see the Stroker fix:
https://github.com/bourgesl/marlin-renderer/commit/b7adf5e606ca0b809118dfe5ab85d4fcf71bd12b#diff-17283d07a3ba6855b0e01eb58cc579c0543b6fae142eb7192dbaa9c9a55e8ef0
Moreover I confirm your 4 disabled tests fail for a good reason: the expected path ignores [...] but the tested path not.
In these cases, the expected path (move only) draws nothing, but the tested path (m + ...) will draw something !
Maybe @prrace could confirm ?
Here is the passing test on my side: https://github.com/bourgesl/marlin-renderer/commit/b7adf5e606ca0b809118dfe5ab85d4fcf71bd12b#diff-38152f6e0b7e1a267ef1391ec7fea12086ce9b573a55d0bbb7f84bb7eb15170e
Please fix the Stroker as proposed, the fix looks good to me (not a reviewer)
-------------
PR: https://git.openjdk.org/jdk/pull/8943
More information about the client-libs-dev
mailing list