Skip to content
Permalink
Browse files
8266520: Revert to OpenGL as the default 2D rendering pipeline for macOS
Reviewed-by: azvegint, trebari, kcr, prr
  • Loading branch information
aghaisas committed May 17, 2021
1 parent 3c010a7 commit 79b39445f6fcd005744c5de89ba2cd2ed5bc0a54
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/java.desktop/macosx/classes/sun/java2d/MacOSFlags.java
@@ -90,16 +90,13 @@ private static void initJavaFlags() {
PropertyState metalState = getBooleanProp("sun.java2d.metal", PropertyState.UNSPECIFIED);

// Handle invalid combinations to use the default rendering pipeline
// Current default rendering pipeline is Metal
// (The default can be changed to OpenGL in future just by toggling two states in this if condition block)
// ---------------------------------------------------------------------
// TODO : Revert default rendering pipeline to OpenGL
// ---------------------------------------------------------------------
// Current default rendering pipeline is OpenGL
// (The default can be changed to Metal in future just by toggling two states in this if condition block)
if ((oglState == PropertyState.UNSPECIFIED && metalState == PropertyState.UNSPECIFIED) ||
(oglState == PropertyState.DISABLED && metalState == PropertyState.DISABLED) ||
(oglState == PropertyState.ENABLED && metalState == PropertyState.ENABLED)) {
metalState = PropertyState.ENABLED; // Enable default pipeline
oglState = PropertyState.DISABLED; // Disable non-default pipeline
oglState = PropertyState.ENABLED; // Enable default pipeline
metalState = PropertyState.DISABLED; // Disable non-default pipeline
}

if (metalState == PropertyState.UNSPECIFIED) {

0 comments on commit 79b3944

Please sign in to comment.