Re: [OpenJDK 2D-Dev] Speed of drawPolyline on JDK11

2018-10-11 Thread Laurent Bourgès
Phil, It reminds me I have rewritten in Marlin renderer the crossing sort at every scanline. Pisces was using a trivial insertion sort but it became very slow when the crossing count is large. I adopted a special merge sort as crossings are mostly ordered: big win. What sort algo is in action in

Re: [OpenJDK 2D-Dev] Speed of drawPolyline on JDK11

2018-10-11 Thread Philip Race
And something else to try .. which I haven't tried, since I now believe the problem isn't the drawing performance of a wide line, is to see what happens if you do go that path - ie try 3,000 individual drawline calls. It depends how much overhead matters whether it is better than (say) breaking

Re: [OpenJDK 2D-Dev] Speed of drawPolyline on JDK11

2018-10-11 Thread Phil Race
In my previous email I was asking only about the "older" system, precisely because as you confirm below, I wanted to know that it was operating on an unscaled graphics. It is being triggered by the scale. If you add : graphics.scale(1.25, 1.25) in your application and run on 8 you'll see the

Re: [OpenJDK 2D-Dev] Crash in CGraphicsDevice.m

2018-10-11 Thread Sergey Bylokhov
Hi, Bill. The similar bug was reported recently: https://bugs.openjdk.java.net/browse/JDK-8211992 The root cause is how we use CoreGraphics display ID. This identifier can become non-valid at any time therefore methods, which is using this id should be ready to it. And this bug found a few

Re: [OpenJDK 2D-Dev] Setting the FreeType LCD filter

2018-10-11 Thread Phil Race
Very well done analysis of the options and very thorough testing of the effects on the different libraries/platforms. > There are some alternatives to setting the filter: >   • Bundle the FreeType library by default Although the build makes this easy to set as an option, we decided we prefer

Re: [OpenJDK 2D-Dev] Crash in CGraphicsDevice.m

2018-10-11 Thread Bill York
Hey Phil, As an update on this discussion, I pulled the latest OpenJDK 8 and got it to build on an OSX 10.75 Mac we have here. To verify that an early return of 0 from getBPPFromModeString works without crashing, I forced getBPPFromModeString to return 0 every 5th call and then, while our app

Re: [OpenJDK 2D-Dev] Setting the FreeType LCD filter

2018-10-11 Thread John Neffenger
On 10/11/2018 11:41 AM, Laurent Bourgès wrote: Maybe just send text and your diff only and keep images as link on github. Right again. Here's just the text, no attachments, formatted in plain text as best I can. Thank you again for your help, Laurent. The symptoms of the problem are the

Re: [OpenJDK 2D-Dev] Setting the FreeType LCD filter

2018-10-11 Thread Laurent Bourgès
John, Sorry but attachments are rejected if larger than 100 kb, then your email is being moderated. You should put resources online, preferably on openjdk.java.net. Maybe just send text and your diff only and keep images as link on github. Laurent Le jeu. 11 oct. 2018 à 19:56, John Neffenger

Re: [OpenJDK 2D-Dev] RFR: 8211962: Implicit narrowing in MacOSX java.desktop jsound

2018-10-11 Thread Krishna Addepalli
Hi Kim, An alternative way to fix it would be to declare the loop variable itself as unsigned, since the channels can never be negative, but that would require you to cast to int in two places. Also, when casting, it is better to use static_cast, rather than C style casting. Thanks, Krishna

Re: [OpenJDK 2D-Dev] Speed of drawPolyline on JDK11

2018-10-11 Thread Laurent Bourgès
Hi, One last thing about Marlin renderer: it is available since OpenJDK9 and you can tune its subpixels to let say 1x1 ie 1 pixel: -Dsun.java2d.renderer.subPixel_log2_X=0 -Dsun.java2d.renderer.subPixel_log2_Y=0 I ran again the 'slow' test on linux ~ 0.5s: - 4x faster than Marlin AA defaults -

Re: [OpenJDK 2D-Dev] Setting the FreeType LCD filter

2018-10-11 Thread Laurent Bourgès
Hi John & Phil, I propose the following patch against jdk/client (openjdk12): diff -r ac510fd737eb src/java.desktop/share/native/libfontmanager/freetypeScaler.c --- a/src/java.desktop/share/native/libfontmanager/freetypeScaler.c Thu Oct 11 14:19:36 2018 +0530 +++

Re: [OpenJDK 2D-Dev] Speed of drawPolyline on JDK11

2018-10-11 Thread Peter Hull
Hi Laurent, Thanks for the detailed explanation. I quickly checked on the older Windows system and the Java 11 window was the same size as the Java 8 one, implying no scaling was going on (I guess just because it has a lower resolution monitor) - so that confirms your hypothesis. If I use

Re: [OpenJDK 2D-Dev] Speed of drawPolyline on JDK11

2018-10-11 Thread Laurent Bourgès
Hi Peter, I confirm that HiDPI support is causing your problem. On linux (xrender), I added -Dsun.java2d.uiScale=2.5 and the performance becomes poor ~ 3.3s vs 0.03s ! java -Dsun.java2d.uiScale=2.5 -DuseAA=false -jar dist/PolylineTest.jar Java: 11 11+28 oct. 11, 2018 1:02:00 PM

Re: [OpenJDK 2D-Dev] Crash in CGraphicsDevice.m

2018-10-11 Thread Bill York
Thanks Phil, All the 61 reports I mentioned below have the same stack. In the same 30 days we also received: * 120 reports about https://bugs.openjdk.java.net/browse/JDK-8146329 or https://bugs.openjdk.java.net/browse/JDK-8133783 * I can’t tell the difference between those two bug

Re: [OpenJDK 2D-Dev] Speed of drawPolyline on JDK11

2018-10-11 Thread Peter Hull
I can answer part of that, but I can't get access to the older system just now. On Wed, Oct 10, 2018 at 4:41 PM Philip Race wrote: > In other words does > > -Dsun.java2d.uiScale=1.0 > > even change the physical size of the window on JDK 9/10/11 ? > Yes, because I can run the same jar under Java

[OpenJDK 2D-Dev] [12] RFR JDK-8212040: Compilation error due to wrong usage of NSPrintJobDispositionValue in mac10.12

2018-10-11 Thread Prasanta Sadhukhan
Hi All, Please review a build issue fix for usage of NSPrintJobDispositionValue in JDK-8211055 : Provide print to a file (PDF) feature even when printer was not connected It seems that NSPrintJobDispositionValue is added in 10.13 sdk

Re: [OpenJDK 2D-Dev] Setting the FreeType LCD filter

2018-10-11 Thread Laurent Bourgès
Hi john, I can sponsor you, preparing an official webrev in openjdk 12, as phil asked for. Laurent Le lun. 8 oct. 2018 à 22:24, John Neffenger a écrit : > Now that we fixed a font problem in JavaFX [1], let's fix the same > problem in Java. I would like your feedback on the Request for >