Welcome to the Lanai Project!
The goal of this Project is to implement a new graphics rendering pipeline for macOS.
This is OpenJDK candidate JEP 382 : https://openjdk.java.net/jeps/382
Early Access builds may be obtained from here : https://jdk.java.net/lanai/
On this wiki we should therefore see regular updates of
- Current status / achievements / where to get the code etc.
- High level milestones
- Project Dashoard
- 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 and generally off-load the CPU.
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 :
2) Metal offers a promise of better performance.
- 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.
Oracle engineers began prototyping to gain an understanding of the Metal API, motivated mainly by that announced deprecation of OpenGL.
This work was published in the openjdk sandbox as the metal-prototype-branch here : http://hg.openjdk.java.net/jdk/sandbox (This branch is closed now as we have moved the repository - see below)
The focus so far has been on mapping metal as a peer to the existing OpenGL pipeline and implementing basic geometric primitive rendering.
This was followed up by prototyping text and image rendering.
Independently JetBrains were also already working on a Metal pipeline, motivated mainly by the prospect of better performance.
Their prototype was published as an OpenJDK contribution in the webrev here :http://cr.openjdk.java.net/~avu/JDK-8220154/webrev.00
This was then merged with the Oracle work in the sandbox.
To foster easier collaboration, this project was then created.
On August 22nd 2019 we moved the code to the lanai mercurial project repositories and closed the sandbox branch where both Oracle and JetBrains engineers can both contribute.
In March 2020 we transitioned the Lanai repository from Mercurial to Git in March 2020 as early adopters of the OpenJDK Project Skara.
On the 14th May 2020 we determined that the state of the work had progressd far enough to publish the first Early Access build at https://jdk.java.net/lanai/
Recent space activity