Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-12-11 Thread Kevin Rushforth
I started looking the FX patch on Friday. I hope to finish my review today. -- Kevin Philip Race wrote: Yes, I approved the 2D patch. I have not yet looked at the FX version. -phil On 12/10/17, 12:39 PM, Laurent Bourgès wrote: Phil, Thanks for your review. I suppose you approved the Java2

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-12-11 Thread Philip Race
Yes, I approved the 2D patch. I have not yet looked at the FX version. -phil On 12/10/17, 12:39 PM, Laurent Bourgès wrote: Phil, Thanks for your review. I suppose you approved the Java2D patch for the RFR thread: [10] RFR JDK-8191814: http://mail.openjdk.java.net/pipermail/2d-dev/2017-Novem

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-12-10 Thread Laurent Bourgès
Phil, Thanks for your review. I suppose you approved the Java2D patch for the RFR thread: [10] RFR JDK-8191814: http://mail.openjdk.java.net/pipermail/2d-dev/2017-November/008741.html I will push tomorrow to jdk forrest as phil & sergey? approved 2D changes. This RFR thread remains open for th

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-12-10 Thread Philip Race
I'm giving this an OK. I've looked at the code, if not the maths, and run our regression test suite. I had a bit of trouble with my full baseline run against which to compare so I've re-run just the test failures that seem like they might go anywhere need this code. and they were pre-existing.

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-11-16 Thread Laurent Bourgès
Phil, Here is an updated webrev: http://cr.openjdk.java.net/~lbourges/marlin/marlin-082-8184429.1/ It fixes the ClipShapeTest to run ~35s (< 2mins) on my latop: 22 test setups only (5000 random polygons each) that covers all aspects of the new clipping algorithm. I wonder if I should remove the

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-11-16 Thread Laurent Bourgès
Sergey, You can generate a number of images using a few threads when the flag is on > then switch it off and compares results. The test should not draw > different(on/off) modes in parallel but it can draw the images for the same > mode. > Yes that is always possible but I do not want to spend to

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-11-15 Thread Sergey Bylokhov
On 15/11/2017 00:50, Laurent Bourgès wrote: Good idea but it can not work: - I use specific a system property to enable/disable Marlin clipping support at runtime - it is by nature not thread safe ! You can generate a number of images using a few threads when the flag is on then switch it of

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-11-15 Thread Laurent Bourgès
Hi Sergey, Le 14 nov. 2017 11:38 PM, "Sergey Bylokhov" a écrit : Hi, Laurent. On 14/11/2017 14:03, Laurent Bourgès wrote: > PS: I added the new ClipShapeTests with special jtreg tags: what is the > default timeout ? The complete tests are slow ~ 20mins, so I added @ignore > but it marks the te

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-11-14 Thread Phil Race
Based on timeout failures I've seen for tests that do not specify a timeout, the default timeout (currently) is 2 minutes. @ignore will by default make jtreg report the test as having an ERROR .. not failed ! The logic for this behaviour is a bit odd but it is what it is/ To have jtreg really i

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-11-14 Thread Sergey Bylokhov
Hi, Laurent. On 14/11/2017 14:03, Laurent Bourgès wrote: PS: I added the new ClipShapeTests with special jtreg tags: what is the default timeout ? The complete tests are slow ~ 20mins, so I added @ignore but it marks the test as failed. Why not split it across the threads? 5~7 minutes is not a

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-11-14 Thread Laurent Bourgès
Phil, Here is the new webrev against up-to-date jdk forrest (2D) + tested with jtreg (marlin package) that provides latest Marlin 0.8.2 including the new path clipping filter (Stroker & Filler): http://cr.openjdk.java.net/~lbourges/marlin/marlin-082-8184429.0/ I will create a new bug (as the curr

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-11-09 Thread Laurent Bourgès
Phil & Kevin, The proposed plan looks good. I will first work on refactoring my ShapeClipTest and then focus on having a Java2d patch ready. I absolutely want that this new performance improvement will ship in Java 10. PS: Another important performance change concerns tuning Java2D tile sizes. T

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-11-08 Thread Kevin Rushforth
And once we are happy with the 2D webrev, it should be pretty straight-forward to review it for FX. -- Kevin Phil Race wrote: I think they should be separate webrevs sent to the separate lists and you should start with 2D as I can then run the JDK regression tests on it. I know you can theor

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-11-08 Thread Phil Race
I think they should be separate webrevs sent to the separate lists and you should start with 2D as I can then run the JDK regression tests on it. I know you can theoretically run the open regression tests too (are you ?) but there are some random scattered closed regression tests that so far as

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-11-08 Thread Laurent Bourgès
Kevin & Phil, Some news on that issue: I successfully managed to finish the Path clipping support in Marlin 0.8.2 (release last week): https://github.com/bourgesl/marlin-renderer/releases/tag/v0.8.2 I fixed few remaining bugs in either Stroker (1) and in PathClipFilter (2) to have proper & tested

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-09-06 Thread Laurent Bourgès
Hi Kevin, Ok I propose to withdraw or postpone this review after JavaOne where we will be able to discuss in a face to face meeting about Marlin & MarlinFX changes for JDK10. I hope the 2d / jfx groups have other Graphics Guru to help, as good as Jim Graham. Cheers, Laurent Le 6 sept. 2017 16:2

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-09-06 Thread Kevin Rushforth
Hi Laurent, Some combination of Phil, Sergey, and I will take a look at this when we can. Perhaps there might be others on these two lists who could lend a helping hand? -- Kevin Laurent Bourgès wrote: Hi all, As Jim is no more available to review & answer my questions on java2d / compute

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-09-06 Thread Laurent Bourgès
Hi all, As Jim is no more available to review & answer my questions on java2d / computer graphics, I need another reviewer on this webrev implementing path clipping in Marlin (huge potential gains). Do you know someone else who can help me in the 2d / prism fields to improve the Marlin renderer e

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-09-05 Thread Laurent Bourgès
Hi Jim, I made good progress on my PathClipFilter that works now perfectly with many test maps for the NZ rule (EO has artefacts if I enable the filter in that case). Here is the updated code below to illustrate the approach: - use a new IndexStack in (D)Helpers to store only corner indexes (0/1

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-09-01 Thread Laurent Bourgès
Jim, Here is the current code for my experimental PathClipFilter only to show you what I have done so far: - DMarlingRenderingEngine.getAATileGenerator(): ... // fill shape: final PathIterator pi = norm.getNormalizingPathIterator(rdrCtx,

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-08-31 Thread Jim Graham
I want to elaborate on winding count issues for segments to the left of the clip for both winding modes. All curves have the property that the winding count of any sample point to the right of them is identical to the winding count of a line from their starting point to their ending point. Co

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-08-31 Thread Jim Graham
I had another thought here. If you have some plan where you can identify incoming paths as "probably benefiting from more aggressive clipping logic" vs others that are classified as "most likely will have little to no clipping" and you want to avoid the overhead of having the early-rejection cl

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-08-31 Thread Jim Graham
First, consider what is handled inside the guts of the Renderer process. - It doesn't need to process any segments above or below the clip, they have no impact on the rendered pieces inside the clip - It needs to process segments that are out-left only in so far as it needs to come up with a pro

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-08-31 Thread Laurent Bourgès
Hi Jim, I am answering your first message: Area is overkill for this as it tries to find exact intersection points of arbitrary geometry. You simply need something that will trace accurately around the outside of a clip to get from an exit point back to an entry point. That is a much simpler op

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-08-31 Thread Jim Graham
To be clear, all that would be needed in cubicTo would be: if (y0 > bot && y1 > bot && y2 > bot && y3 > bot) { xy0 = xy3; return; } if (y0 < top && y1 < top && y2 < top && y3 < top) { xy0 = xy3; return; } if (x0 > rgt && x1 > rgt && x2 > rgt && x3 > rgt) { xy0 = xy3; return; } if (x0 < lft && x1

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-08-31 Thread Jim Graham
Hi Laurent, Area is overkill for this as it tries to find exact intersection points of arbitrary geometry. You simply need something that will trace accurately around the outside of a clip to get from an exit point back to an entry point. That is a much simpler operation. The performance is

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-08-31 Thread Laurent Bourgès
Jim, FYI I am working on a more general clipper for filled shapes (only non zero winding rule) that ignores useless segments on left / right sides but leaves the path closed for filling primitives. It is more tricky... to handle turning points (corners) but I think it could be applied later to th

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-08-28 Thread Jim Graham
Hi Laurent, On 8/28/17 2:09 PM, Laurent Bourgès wrote: Hi Jim, Thanks for your comments, it helped refining the webrev. Here are my answers: 2017-08-26 2:22 GMT+02:00 Jim Graham mailto:james.gra...@oracle.com>>: [D]Dasher.java - why the changes from (firstSegIdx > 0) to (firstSegIdx !=

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-08-28 Thread Laurent Bourgès
Hi Jim, Thanks for your comments, it helped refining the webrev. Here are my answers: 2017-08-26 2:22 GMT+02:00 Jim Graham : > [D]Dasher.java - why the changes from (firstSegIdx > 0) to (firstSegIdx != > 0)? > As firstSegIdx is initialized to 0, I prefer testing (firstSegIdx != 0) as it looks

Re: [OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-08-25 Thread Jim Graham
Hi Laurent, I'm just reading through the code now to get a handle on the nature of the changes...(and starting with the 2D version)... [D]Dasher.java - why the changes from (firstSegIdx > 0) to (firstSegIdx != 0)? [D]Dasher.java - why is there a new goto_starting() which is only used from one p

[OpenJDK 2D-Dev] RFR JDK-8184429: Path clipper added in Marlin2D & MarlinFX 0.8.0

2017-08-25 Thread Laurent Bourgès
Hi, Please review Marlin/FX upgrades that provide an efficient path clipper in Stroker (float / double variants) fixing the bug JDK-8184429 Marlin2D patch (jdk10): http://cr.openjdk.java.net/~lbourges/marlin/marlin-080.0/ MarlinFX patch (openjfx1