[OpenJDK 2D-Dev] [10] RFR JDK-8191814: Marlin rasterizer spends time computing geometry for stroked segments that do not intersect the clip

Laurent Bourgès bourges.laurent at gmail.com
Mon Dec 4 22:35:00 UTC 2017

Hi Sergey,

Thanks for your comment.

This new test only validates the new clipping algorithms ie it compares the
rendering outputs with / without clipping enabled.

As such algorithms are only available in Marlin 0.8.2 and the test uses new
system properties to enable/disable clipping, I confirm it passes before
(jdk9 or jdk10 before patch).

To ensure it detects any regression, I manually inserted some bugs in the
clipping code, and the test failed.

Note: I should add another test @run to check the float variant too (and
not only the double variant, the default in jdk10).

Finally I could write a new performance test that would prove clipping is
more efficient than before.
Such test would fail before patch (timeout ?), but it is difficult to make
it robust as it depends on the hw.
Jim wrote a basic test in the jfx bug showing 300ms without but 2ms now =>
gain is high.
A possible success condition would be: clipping gain > 10 or 50.


Le 4 déc. 2017 11:11 PM, "Sergey Bylokhov" <Sergey.Bylokhov at oracle.com> a
écrit :

Hi, Laurent.

On 29/11/2017 14:30, Laurent Bourgès wrote:

> - added new ClipShapeTest (jtreg) that checks all possible combinations of
> (cap / join) for random polyline (Stroker) and polygons (Filler) comparing
> image outputs rendered with clipping enabled vs disabled

I have only one note that the test is passed before the fix, so if we will
regress at some point later we will not catch this.

Best regards, Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20171204/ea3091fb/attachment.html>

More information about the 2d-dev mailing list