Skip to content

Commit cb8394a

Browse files
committedApr 17, 2021
8265304: Temporarily make Metal the default 2D rendering pipeline for macOS
Reviewed-by: jdv, kcr, azvegint, prr
1 parent 66f8987 commit cb8394a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed
 

‎src/java.desktop/macosx/classes/sun/java2d/MacOSFlags.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,16 @@ private static void initJavaFlags() {
9090
PropertyState metalState = getBooleanProp("sun.java2d.metal", PropertyState.UNSPECIFIED);
9191

9292
// Handle invalid combinations to use the default rendering pipeline
93-
// Current default rendering pipeline is OpenGL
94-
// (The default can be changed to Metal in future just by toggling two states in this if condition block)
93+
// Current default rendering pipeline is Metal
94+
// (The default can be changed to OpenGL in future just by toggling two states in this if condition block)
95+
// ---------------------------------------------------------------------
96+
// TODO : Revert default rendering pipeline to OpenGL
97+
// ---------------------------------------------------------------------
9598
if ((oglState == PropertyState.UNSPECIFIED && metalState == PropertyState.UNSPECIFIED) ||
9699
(oglState == PropertyState.DISABLED && metalState == PropertyState.DISABLED) ||
97100
(oglState == PropertyState.ENABLED && metalState == PropertyState.ENABLED)) {
98-
oglState = PropertyState.ENABLED; // Enable default pipeline
99-
metalState = PropertyState.DISABLED; // Disable non-default pipeline
101+
metalState = PropertyState.ENABLED; // Enable default pipeline
102+
oglState = PropertyState.DISABLED; // Disable non-default pipeline
100103
}
101104

102105
if (metalState == PropertyState.UNSPECIFIED) {

0 commit comments

Comments
 (0)