[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
Tue Dec 5 14:30:50 UTC 2017

Hi again,

Here is a new webrev fixing the ClipShapeTest:

- @run twice to test both Marlin variants (float / double)
- use Logger to get & check marlin system properties
("sun.java2d.renderer.clip.runtime.enable") to ensure the test is run
against a Marlin renderer having the clipping features

I tested the fixed test on JDK9 and it fails:
runner finished test: sun/java2d/marlin/ClipShapeTest.java
Failed. Execution failed: `main' threw exception:
java.lang.RuntimeException: Marlin clipping not enabled at runtime !

On JDK10 + patch, it passes:
Passed. Execution successful

PS: Could anyone review the patch ? before RDP1 deadline ?


2017-12-04 23:35 GMT+01:00 Laurent Bourgès <bourges.laurent at gmail.com>:

> 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.
> Regards,
> Laurent
> 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.

Laurent Bourgès
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20171205/ab6f660f/attachment.html>

More information about the 2d-dev mailing list