[OpenJDK 2D-Dev] RFR: 7018932 : Drawing very large coordinates with a dashed Stroke can cause Java to hang [v4]

Laurent Bourgès lbourges at openjdk.java.net
Mon Jan 11 09:04:00 UTC 2021


On Mon, 11 Jan 2021 06:08:15 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Laurent Bourgès has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fixed RenderingEngine.strokeTo(clip) to call by default former method.
>>   Fixed CurveClipSplitter (float) to use double-precision for higher
>>   accuracy.
>>   Improved StrokedLineTest to use only bufferedimage rendering.
>
> src/java.desktop/share/classes/sun/java2d/marlin/TransformingPathConsumer2D.java line 902:
> 
>> 900: 
>> 901:         // clip rectangle (ymin, ymax, xmin, xmax) including padding:
>> 902:         final double[] clipRectPad = new double[4];
> 
> It does not seem related to this fix? Or an updated test uncovered this?

This fix in Marlin (float) renderer is needed as this numerical precision issue was triggered by the StrokedLinePerf using the MarlinRenderingEngine. It is very similar to DTransformingPathConsumer2D (but reuse was not trivial).

I propose to remove the MarlinRenderingEngine (single-precision) in a follow-up issue ... to simplify the maintenance.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2013


More information about the 2d-dev mailing list