This wiki page (and any sub-pages) are to be used to document progress on a Metal rendering pipeline for OS and as a collaboration medium for the OpenJDK developers working it, as a better alternative than private emails.
When email needs to be sent, we will use firstname.lastname@example.org. Eg for code reviews.
The Metal pipeline work is not a formal OpenJDK project, but is being guided by the 2d group. A JEP is not yet drafted or submitted but one is likely once we move past the prototyping stage and this wiki will be updated to reflect that.
Update July 10th 2019 : We have decided to propose this as a project called Lanai.
There may be changes to our processes as a result and this page will get updated.
On this page we should therefore see regular updates of
- Current status / achievements / where to get the code etc.
- Work in progress
- Future plans
Where does a rendering pipeline fit in ?
It is transparent to applications but here's why it matters :
Most Java SE UI applications are written using the Swing toolkit. This is a lightweight toolkit that renders using the Java 2D API.
Internally Java 2D can use software rendering plus a blit to the screen or it can use a platform-specific API, such as X11/Xrender or Direct3D, or on MacOS, OpenGL. These platform APIs often offer much better performance of the application than software rendering.
Metal is the new Apple platform API for such rendering replacing OpenGL. The name has NOTHING to do with the Swing Metal L+F. That is just a coincidence.
Information on Metal here : https://developer.apple.com/metal/
Why are we doing this ?
1) OpenGL is deprecated :
- Fully functional pipeline
Feature parity (at least) with the existing OpenGL pipeline
Performance as good or better than OpenGL in real applications as well as benchmarks
No regressions or TCK failures
A clean architecture that both fits into the existing 2D design and takes advantage of Metal features such as greater support for concurrent rendering.=
Leverage this work to also support development of a Metal rendering pipeline for the OpenJFX project which is similarly impacted.
What has happened so far ?
When Apple formally deprecated OpenGL in Summer 2018, we realised we needed to begin looking into Metal ASAP.
Since then Oracle engineers have been prototyping to gain an understanding of the Metal API, motivated mainly by that announced deprecation of OpenGL.
This work is published in the openjdk sandbox as the metal-prototype-branch here : http://hg.openjdk.java.net/jdk/sandbox
Focus so far has been on mapping metal as a peer to the existing OpenGL pipeline and implementing basic geometric primitive rendering. This is currently being followed up by prototyping text and image rendering.
I will defer to JetBrains to characterize their work so far.
What happens next ?
By continuing separately we are creating technical debt and not making efficient use of resources. The intent is that after some small amount of additional prototyping to merge the work into the OpenJDK sandbox and collaborate there to satisfy the goals set out above. The development process will however continue to be relatively informal for some time to come. We aren't expecting to use bug ids for reviews or pushes into the sandbox, at least for now. When code reviews will be required is yet to be determined.
Project Lanai is sponsored by the 2D group. It has its own wiki page. See Project Lanai.