-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8260931: Implement JEP 382: New macOS Rendering Pipeline #2403
Conversation
👋 Welcome back aghaisas! A progress list of the required criteria for merging this PR into |
/reviewers 3 |
@aghaisas |
/contributor add jdv |
@aghaisas |
/contributor add avu |
@aghaisas |
/contributor add abochkarev |
@aghaisas |
/contributor add psadhukhan |
@aghaisas |
/contributor add dkonoplev |
@aghaisas |
/contributor add prr |
@aghaisas |
/contributor add kcr |
@aghaisas |
/contributor add ihse |
@aghaisas |
/csr |
@aghaisas has indicated that a compatibility and specification (CSR) request is needed for this pull request. |
/contributor add aghaisas |
@aghaisas |
@aghaisas This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 35 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
We have addressed the review comments (except for a few minor follow-on issues) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest changes look good. I confirmed that this PR has all of the content from the lanai repo.
cachedSrc = srcTmp.get(); | ||
} | ||
|
||
// We can convert argb_pre data from MTL surface in two places: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, just to confirm. I wrote that text for OGL because it was the fastest way to transfer+convert the data from the video card to the memory. And as far as I understand the metal has the same limitation? It is not possible to convert it to some non-ARGB/Pre format on the fly while transferring the pixles?
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLSurfaceDataBase.h
Show resolved
Hide resolved
Mailing list message from Scott Palmer on awt-dev:
Are the glyphs different or just the way they are rasterized? Newer versions of macOS don?t do LCD text and have gone back to plain grey-scale anti-aliasing. Scott |
Mailing list message from Jayathirth D V on awt-dev:
By default we don?t do LCD anti-aliasing for text, only when we set Text Rendering Hint to use LCD antialiasing we take sub-pixel rendering path.
|
And it actually produces LCD glyphs? not the grayscale? |
Mailing list message from Jayathirth D V on awt-dev:
We get glyphs which take more than a byte to represent each pixel. |
/integrate |
@aghaisas Since your change was applied there have been 38 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 8afec70. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Description :
This is the implementation of JEP 382 : New macOS Rendering Pipeline
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
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
Note to reviewers :
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.
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)
Review comments (including some preliminary informal review comments) are tracked with JBS issues - https://bugs.openjdk.java.net/issues/?filter=40598
Progress
Issue
Reviewers
Contributors
<jdv@openjdk.org>
<avu@openjdk.org>
<abochkarev@openjdk.org>
<psadhukhan@openjdk.org>
<dkonoplev@openjdk.org>
<prr@openjdk.org>
<kcr@openjdk.org>
<ihse@openjdk.org>
<aghaisas@openjdk.org>
Download
$ git fetch https://git.openjdk.java.net/jdk pull/2403/head:pull/2403
$ git checkout pull/2403