Re: [OpenJDK 2D-Dev] RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v25]

2021-03-11 Thread David Holmes
On 12/03/2021 5:12 pm, Anton Kozlov wrote: On Fri, 12 Mar 2021 05:24:10 GMT, David Holmes wrote: Anton Kozlov has updated the pull request incrementally with one additional commit since the last revision: 8262903: [macos_aarch64] Thread::current() called on detached thread

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Ajit Ghaisas
On Fri, 12 Mar 2021 01:01:09 GMT, Sergey Bylokhov wrote: >> Ajit Ghaisas has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 47 additional >>

Re: [OpenJDK 2D-Dev] RFR: JDK-8263467: Incorrect double-checked locking in sun.java2d.CRenderer

2021-03-11 Thread Aleksey Shipilev
On Fri, 12 Mar 2021 03:19:12 GMT, Sergey Bylokhov wrote: >> SonarCloud reports multiple incorrect double-checked locking cases in >> `sun.java2d.CRenderer`. For example: >> >> Arc2D arcToShape; >> >> ... >> if (arcToShape == null) { >> synchronized (this) { >>

Re: [OpenJDK 2D-Dev] RFR: JDK-8263467: Incorrect double-checked locking in sun.java2d.CRenderer [v2]

2021-03-11 Thread Aleksey Shipilev
> SonarCloud reports multiple incorrect double-checked locking cases in > `sun.java2d.CRenderer`. For example: > > Arc2D arcToShape; > > ... > if (arcToShape == null) { > synchronized (this) { > if (arcToShape == null) { >

Re: [OpenJDK 2D-Dev] RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v25]

2021-03-11 Thread Anton Kozlov
On Fri, 12 Mar 2021 05:24:10 GMT, David Holmes wrote: >> Anton Kozlov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8262903: [macos_aarch64] Thread::current() called on detached thread > >

Re: [OpenJDK 2D-Dev] RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v25]

2021-03-11 Thread David Holmes
On Thu, 11 Mar 2021 14:07:43 GMT, Anton Kozlov wrote: >> Please review the implementation of JEP 391: macOS/AArch64 Port. >> >> It's heavily based on existing ports to linux/aarch64, macos/x86_64, and >> windows/aarch64. >> >> Major changes are in: >> * src/hotspot/cpu/aarch64: support of

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Jayathirth D V
> On 12-Mar-2021, at 10:30 AM, Sergey Bylokhov wrote: > > On Fri, 12 Mar 2021 00:09:54 GMT, Kevin Rushforth wrote: > >>> Ajit Ghaisas has updated the pull request with a new target base due to a >>> merge or a rebase. The incremental webrev excludes the unrelated changes >>> brought in by

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Sergey Bylokhov
On Fri, 12 Mar 2021 00:09:54 GMT, Kevin Rushforth wrote: >> Ajit Ghaisas has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 47 additional >>

Re: [OpenJDK 2D-Dev] RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Prasanta Sadhukhan
On Thu, 11 Mar 2021 14:59:55 GMT, Alexey Ivanov wrote: >> [JDK-8153732](https://bugs.openjdk.java.net/browse/JDK-8153732) implemented >> polling for remote printers. >> That bug description also mentions watching the registry for changes and >> links to the article which describes the method

Re: [OpenJDK 2D-Dev] RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Prasanta Sadhukhan
On Thu, 11 Mar 2021 14:49:59 GMT, Alexey Ivanov wrote: >> I also am not sure on this. But I think since this is for remote printer, >> sometimes network availability issue might be there so it may fail more >> compared to local printer so I guess we should give this method a fair >> chance,

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Jayathirth D V
> On 12-Mar-2021, at 9:29 AM, Scott Palmer wrote: > > >> On Mar 11, 2021, at 9:53 PM, Sergey Bylokhov wrote: >> >> On Fri, 12 Mar 2021 02:29:04 GMT, Jayathirth D V wrote: >> src/java.desktop/macosx/classes/sun/java2d/metal/MTLSurfaceData.java line 323: > 321: *

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Ajit Ghaisas
On Fri, 12 Mar 2021 01:04:22 GMT, Sergey Bylokhov wrote: >> Ajit Ghaisas has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 47 additional >>

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Prasanta Sadhukhan
On Fri, 12 Mar 2021 00:48:58 GMT, Sergey Bylokhov wrote: >> Ajit Ghaisas has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 47 additional >>

Re: [OpenJDK 2D-Dev] RFR: 8263138: Initialization of sun.font.SunFontManager.platformFontMap is not thread safe

2021-03-11 Thread Sergey Bylokhov
On Wed, 10 Mar 2021 23:13:09 GMT, Sergey Bylokhov wrote: >> 8263138: Initialization of sun.font.SunFontManager.platformFontMap is not >> thread safe > > Marked as reviewed by serb (Reviewer). @prrace Do you have any objections to integrating this change? - PR:

Re: [OpenJDK 2D-Dev] RFR: JDK-8263467: Incorrect double-checked locking in sun.java2d.CRenderer

2021-03-11 Thread Sergey Bylokhov
On Thu, 11 Mar 2021 19:13:47 GMT, Aleksey Shipilev wrote: > SonarCloud reports multiple incorrect double-checked locking cases in > `sun.java2d.CRenderer`. For example: > > Arc2D arcToShape; > > ... > if (arcToShape == null) { > synchronized (this) { >

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Sergey Bylokhov
On Fri, 12 Mar 2021 02:29:04 GMT, Jayathirth D V wrote: >> src/java.desktop/macosx/classes/sun/java2d/metal/MTLSurfaceData.java line >> 323: >> >>> 321: * more code just to support a few uncommon cases. >>> 322: */ >>> 323: public boolean canRenderLCDText(SunGraphics2D sg2d) { >>

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Jayathirth D V
On Fri, 12 Mar 2021 00:42:35 GMT, Sergey Bylokhov wrote: >> Ajit Ghaisas has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 47 additional >>

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v10]

2021-03-11 Thread Sergey Bylokhov
On Wed, 10 Mar 2021 11:43:43 GMT, Ajit Ghaisas wrote: >> src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java line >> 304: >> >>> 302: }; >>> 303: } >>> 304: public MTLLayer createMTLLayer() { >> >> TODO to test that this functionality

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v10]

2021-03-11 Thread Sergey Bylokhov
On Tue, 9 Mar 2021 20:16:25 GMT, Alexey Ushakov wrote: >> src/java.desktop/macosx/classes/sun/java2d/metal/MTLBlitLoops.java line 499: >> >>> 497: } >>> 498: >>> 499: // We can convert argb_pre data from MTL surface in two places: >> >> Does anybody check that this is true for

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Sergey Bylokhov
On Thu, 11 Mar 2021 18:00:15 GMT, Ajit Ghaisas wrote: >> **Description :** >> This is the implementation of [JEP 382 : New macOS Rendering >> Pipeline](https://bugs.openjdk.java.net/browse/JDK-8238361) >> It implements a Java 2D internal rendering pipeline for macOS using the >> Apple Metal

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Kevin Rushforth
On Thu, 11 Mar 2021 18:00:15 GMT, Ajit Ghaisas wrote: >> **Description :** >> This is the implementation of [JEP 382 : New macOS Rendering >> Pipeline](https://bugs.openjdk.java.net/browse/JDK-8238361) >> It implements a Java 2D internal rendering pipeline for macOS using the >> Apple Metal

Re: [OpenJDK 2D-Dev] RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v12]

2021-03-11 Thread Stefan Karlsson
On Tue, 9 Mar 2021 17:55:12 GMT, Anton Kozlov wrote: >> src/hotspot/share/runtime/thread.cpp line 2515: >> >>> 2513: void JavaThread::check_special_condition_for_native_trans(JavaThread >>> *thread) { >>> 2514: // Enable WXWrite: called directly from interpreter native wrapper. >>> 2515:

Re: [OpenJDK 2D-Dev] RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v25]

2021-03-11 Thread Stefan Karlsson
On Thu, 11 Mar 2021 14:07:43 GMT, Anton Kozlov wrote: >> Please review the implementation of JEP 391: macOS/AArch64 Port. >> >> It's heavily based on existing ports to linux/aarch64, macos/x86_64, and >> windows/aarch64. >> >> Major changes are in: >> * src/hotspot/cpu/aarch64: support of

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Phil Race
On Thu, 11 Mar 2021 18:00:15 GMT, Ajit Ghaisas wrote: >> **Description :** >> This is the implementation of [JEP 382 : New macOS Rendering >> Pipeline](https://bugs.openjdk.java.net/browse/JDK-8238361) >> It implements a Java 2D internal rendering pipeline for macOS using the >> Apple Metal

[OpenJDK 2D-Dev] RFR: JDK-8263467: Incorrect double-checked locking in sun.java2d.CRenderer

2021-03-11 Thread Aleksey Shipilev
SonarCloud reports multiple incorrect double-checked locking cases in `sun.java2d.CRenderer`. For example: Arc2D arcToShape; ... if (arcToShape == null) { synchronized (this) { if (arcToShape == null) { arcToShape = new

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v12]

2021-03-11 Thread Ajit Ghaisas
On Thu, 11 Mar 2021 07:40:47 GMT, Alexey Ushakov wrote: >> Ajit Ghaisas has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 45 additional >>

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v13]

2021-03-11 Thread Ajit Ghaisas
> **Description :** > This is the implementation of [JEP 382 : New macOS Rendering > Pipeline](https://bugs.openjdk.java.net/browse/JDK-8238361) > It implements a Java 2D internal rendering pipeline for macOS using the Apple > Metal API. > The entire work on this was done under [OpenJDK Project

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v12]

2021-03-11 Thread Ajit Ghaisas
On Mon, 8 Feb 2021 18:47:09 GMT, Sergey Bylokhov wrote: >> src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLGraphicsConfig.m >> line 82: >> >>> 80: (JNIEnv *env, jclass mtlgc) >>> 81: { >>> 82: FILE *f = popen("/usr/sbin/system_profiler SPDisplaysDataType", >>> "r"); >> >>

Re: [OpenJDK 2D-Dev] RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v10]

2021-03-11 Thread Alexey Ushakov
On Tue, 9 Mar 2021 23:15:57 GMT, Sergey Bylokhov wrote: >> Also, MTLSD_WINDOW is supported > > How it is used? Can we really draw to the window directly? It looks like it > copied from the OGL where it is unused since CLayer integration. Something is > inconsistent here. Here is a follow-up

Re: [OpenJDK 2D-Dev] RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Alexey Ivanov
On Wed, 10 Mar 2021 15:38:27 GMT, Alexey Ivanov wrote: > [JDK-8153732](https://bugs.openjdk.java.net/browse/JDK-8153732) implemented > polling for remote printers. > That bug description also mentions watching the registry for changes and > links to the article which describes the method yet

Re: [OpenJDK 2D-Dev] RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Alexey Ivanov
On Thu, 11 Mar 2021 11:30:52 GMT, Prasanta Sadhukhan wrote: >>> I guess having "FALSE" as fAsynchronous value mean the function does not >>> return until a change has occurred so do we still need this do-while >>> monitoring loop? >> >> You're right, `FALSE` for `fAsynchronous` means the

Re: [OpenJDK 2D-Dev] RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v25]

2021-03-11 Thread Anton Kozlov
> Please review the implementation of JEP 391: macOS/AArch64 Port. > > It's heavily based on existing ports to linux/aarch64, macos/x86_64, and > windows/aarch64. > > Major changes are in: > * src/hotspot/cpu/aarch64: support of the new calling convention (subtasks > JDK-8253817, JDK-8253818)

Re: [OpenJDK 2D-Dev] RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v23]

2021-03-11 Thread Anton Kozlov
On Wed, 3 Mar 2021 15:57:13 GMT, Gerard Ziemski wrote: >> src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp line 207: >> >>> 205: // Enable WXWrite: this function is called by the signal handler at >>> arbitrary >>> 206: // point of execution. >>> 207: ThreadWXEnable wx(WXWrite, thread);

Re: [OpenJDK 2D-Dev] RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Prasanta Sadhukhan
On Thu, 11 Mar 2021 10:54:12 GMT, Alexey Ivanov wrote: >> src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp line 259: >> >>> 257: NULL, >>> 258: FALSE); >>> 259:

Re: [OpenJDK 2D-Dev] RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Alexey Ivanov
On Thu, 11 Mar 2021 10:39:56 GMT, Prasanta Sadhukhan wrote: > I guess having "FALSE" as fAsynchronous value mean the function does not > return until a change has occurred so do we still need this do-while > monitoring loop? You're right, `FALSE` for `fAsynchronous` means the function

Re: [OpenJDK 2D-Dev] RFR: 8263311: Watch registry changes for remote printers update instead of polling

2021-03-11 Thread Prasanta Sadhukhan
On Wed, 10 Mar 2021 15:38:27 GMT, Alexey Ivanov wrote: > [JDK-8153732](https://bugs.openjdk.java.net/browse/JDK-8153732) implemented > polling for remote printers. > That bug description also mentions watching the registry for changes and > links to the article which describes the method yet

Re: [OpenJDK 2D-Dev] RFR: JDK-8263362: Avoid division by 0 in java/awt/font/TextJustifier.java justify

2021-03-11 Thread Prasanta Sadhukhan
On Thu, 11 Mar 2021 06:45:05 GMT, Matthias Baesken wrote: >> By that same logic, then shouldn't absorbweight also be checked as != 0 >> instead of > 0 as that also uses += gi.weight > > Hi, I am not sure about the absorbweight check; but currently the > calculated value weightedAbsorb is