From alexey.ushakov at jetbrains.com Tue Mar 5 14:17:24 2019 From: alexey.ushakov at jetbrains.com (Alexey Ushakov) Date: Tue, 5 Mar 2019 17:17:24 +0300 Subject: JDK-8220154 Improve java2d rendering performance on macOS by using Metal framework Message-ID: Hello, As far as we know Apple has deprecated OpenGL on MacOS platform (https://developer.apple.com/macos/whats-new/). Unfortunately, this decision greatly affects our products that based on Java Client technologies. So, we (here at JetBrains) decided to start a project to replace OpenGL rendering on MacOS platform with a new one based on Metal. This is a huge task, so we decided to leverage current rendering architecture that is used in OpenGL rendering pipeline on Mac. That?s why we didn?t use MTKView for representing AWT windows (that probably would be a better approach in the long term). Currently we're using CAMetalLayer within AWTView. We?ve implemented flat color shape/curve rendering so far and there is a lot of work to do. So, we?re looking forward to any collaboration. In the mean time I?d like to share our current work to discuss metal pipeline architecture at the early stage of work. Here is the webrev with our on going development: http://cr.openjdk.java.net/~avu/JDK-8220154/webrev.00 Best Regards, Alexey From Sergey.Bylokhov at oracle.com Tue Mar 5 18:34:35 2019 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Tue, 5 Mar 2019 10:34:35 -0800 Subject: JDK-8220154 Improve java2d rendering performance on macOS by using Metal framework In-Reply-To: References: Message-ID: Hi, Alexey. You are welcome! I know that one of the goal of this work is to improve the performance of 2d pipeline, did you try to drop the usage of the RenderQueue? I guess metal could be used from the different threads. Also did you try to compare stuff currently implemented in metal to the equivalent stuff in OGL? -- Best regards, Sergey. From alexey.ushakov at jetbrains.com Tue Mar 5 20:04:34 2019 From: alexey.ushakov at jetbrains.com (Alexey Ushakov) Date: Tue, 5 Mar 2019 23:04:34 +0300 Subject: JDK-8220154 Improve java2d rendering performance on macOS by using Metal framework In-Reply-To: References: Message-ID: <38E4D606-89D0-49BE-879D-C335119E9386@jetbrains.com> Hi Sergey, > I know that one of the goal of this work is to improve the performance of 2d pipeline, did you try to drop the usage of the RenderQueue? I suppose we can replace RenderingQueue with Metal command queues. It hasn?t been done yet but we definetely would like to try. > Also did you try to compare stuff currently implemented in metal to the equivalent stuff in OGL? Yes, I?ve put our micro benchmarks (MetalPerfTest) to the webrev and we have a VM property that switches the rendering pipelines. Current implementation is ~2x slower than OGL one but it was not so carefully optimized. Also, I suppose that dropping RenderingQueue may help here too. Best Regards, Alexey > On 5 Mar 2019, at 21:34, Sergey Bylokhov wrote: > > Hi, Alexey. > > You are welcome! > > I know that one of the goal of this work is to improve the performance of 2d pipeline, did you try to drop the usage of the RenderQueue? I guess metal could be used from the different threads. > Also did you try to compare stuff currently implemented in metal to the equivalent stuff in OGL? > > > -- > Best regards, Sergey. From philip.race at oracle.com Sun Mar 24 19:08:09 2019 From: philip.race at oracle.com (Philip Race) Date: Sun, 24 Mar 2019 12:08:09 -0700 Subject: JDK-8220154 Improve java2d rendering performance on macOS by using Metal framework In-Reply-To: References: Message-ID: <5C97D599.6090101@oracle.com> Hi, We've had some off-line discussion and when future email on this is needed we'll use 2d-dev at openjdk.java.net. So please let us consider this email to be closure on this list. Also there is now a wiki page to document this requirement, which is something Oracle has independently begun investigating : https://wiki.openjdk.java.net/display/2d/Metal+Graphics+Pipeline+for+MacOS Remember, any questions about that page or anything else, go to 2d-dev and create a new thread, and do not include or CC this list .. -phil. On 3/5/19, 6:17 AM, Alexey Ushakov wrote: > Hello, > > As far as we know Apple has deprecated OpenGL on MacOS platform (https://developer.apple.com/macos/whats-new/). > > Unfortunately, this decision greatly affects our products that based on Java Client technologies. So, we (here at JetBrains) decided to start a project to replace OpenGL rendering on MacOS platform with a new one based on Metal. This is a huge task, so we decided to leverage current rendering architecture that is used in OpenGL rendering pipeline on Mac. > > That?s why we didn?t use MTKView for representing AWT windows (that probably would be a better approach in the long term). Currently we're using CAMetalLayer within AWTView. We?ve implemented flat color shape/curve rendering so far and there is a lot of work to do. So, we?re looking forward to any collaboration. > > In the mean time I?d like to share our current work to discuss metal pipeline architecture at the early stage of work. > > Here is the webrev with our on going development: > > http://cr.openjdk.java.net/~avu/JDK-8220154/webrev.00 > > Best Regards, > Alexey