Re: RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v6]

2021-02-10 Thread Alexey Ushakov
On Fri, 5 Feb 2021 22:59:43 GMT, Kevin Rushforth  wrote:

>> Ajit Ghaisas has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - Lanai PR#179 - 8261402 - avu
>>  - Lanai PR#178 - 8261273 - avu
>
> src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLTexurePool.m line 
> 29:
> 
>> 27: #import "Trace.h"
>> 28: 
>> 29: #define SCREEN_MEMORY_SIZE_4K (4096*2160*4) //~33,7 mb
> 
> This means that a 4k display with a narrower aspect ratio wouldn't fit 
> (assuming there ever were to be such a thing). What would happen if you 
> encountered a screen that was, say, 4k * 2.5K?

This parameter manages our caching strategy for the temporary texture pool. 
Huge texture allocations 4K/2 size will cause texture pool drain. We need some 
more profiling to just these parameters. And I think we need to use Metal API 
(https://developer.apple.com/documentation/metal/mtldevice/2369280-recommendedmaxworkingsetsize?language=objc)
 in the future to adjust the amount of memory that we should use.

-

PR: https://git.openjdk.java.net/jdk/pull/2403


Re: RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v6]

2021-02-10 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 - 
> Lanai](http://openjdk.java.net/projects/lanai/)
> 
> We iterated through several Early Access (EA) builds and have reached a stage 
> where it is ready to be integrated to openjdk/jdk. The latest EA build is 
> available at - https://jdk.java.net/lanai/
> 
> A new option -Dsun.java2d.metal=true | True needs to be used to use this 
> pipeline.
> 
> **Testing :**
> This implementation has been tested with the tests present at - [Test Plan 
> for JEP 382: New macOS Rendering 
> Pipeline](https://bugs.openjdk.java.net/browse/JDK-8251396)
> 
> **Note to reviewers :**
> 1) Default rendering pipeline on macOS has not been changed by this PR. 
> OpenGL still stays as the default rendering pipeline and Metal rendering 
> pipeline is optional to choose.
> 
> 2) To apply and test this PR - 
> To enable the metal pipeline you must specify on command line 
> -Dsun.java2d.metal=true (No message will be printed in this case) or 
> -Dsun.java2d.metal=True (A message indicating Metal rendering pipeline is 
> enabled gets printed)
> 
> 3) Review comments (including some preliminary informal review comments) are 
> tracked with JBS issues - https://bugs.openjdk.java.net/issues/?filter=40598

Ajit Ghaisas has updated the pull request incrementally with two additional 
commits since the last revision:

 - Lanai PR#179 - 8261402 - avu
 - Lanai PR#178 - 8261273 - avu

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2403/files
  - new: https://git.openjdk.java.net/jdk/pull/2403/files/9a72538a..6a3f96ef

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=2403=05
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=2403=04-05

  Stats: 73 lines in 6 files changed: 9 ins; 39 del; 25 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2403.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2403/head:pull/2403

PR: https://git.openjdk.java.net/jdk/pull/2403