Fix Version/s: 17
Compatibility Risk Description:This is a substantial new piece of code and it may not render or perform identically.
Interface Kind:System or security property
Provide a new implementation system property to enable the Java 2D Metal rendering pipeline for macOS.
Java 2D has previously supported only OpenGL for on-screen rendering on macOS. With the delivery of the new Metal API rendering pipeline, and since Metal will be "off by default", we need a way to turn it on.
Follow the established pattern used on other platforms where there are multiple pipelines and provide an implementation system property "sun.java2d.metal" which can be used to select this new optional pipeline.
The system property name is "sun.java2d.metal" and a value specified as -Dsun.java2d.metal = "t" | "T" | "true" | "True" | "" will request the Metal API pipeline to be used where it is available and supported.
In the event that metal becomes the default and an alternative pipeline is available, Metal can be disabled by specifying
-Dsun.java2d.metal= "f" | "F" | "false" | "False"
The options with an initial capital letter are verbose options which cause a message to be printed to System.out confirming whether the Metal pipeline was enabled.
On platforms other than macOS this system property has no effect.