--- old/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java 2018-10-15 17:30:26.000000000 -0700 +++ new/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java 2018-10-15 17:30:26.000000000 -0700 @@ -54,12 +54,14 @@ import sun.java2d.pipe.hw.AccelSurface; import sun.java2d.pipe.hw.AccelTypedVolatileImage; import sun.java2d.pipe.hw.ContextCapabilities; -import static sun.java2d.opengl.OGLSurfaceData.*; -import static sun.java2d.opengl.OGLContext.OGLContextCaps.*; - import sun.lwawt.LWComponentPeer; import sun.lwawt.macosx.CPlatformView; +import static sun.java2d.opengl.OGLContext.OGLContextCaps.CAPS_DOUBLEBUFFERED; +import static sun.java2d.opengl.OGLContext.OGLContextCaps.CAPS_EXT_FBOBJECT; +import static sun.java2d.opengl.OGLSurfaceData.FBOBJECT; +import static sun.java2d.opengl.OGLSurfaceData.TEXTURE; + public final class CGLGraphicsConfig extends CGraphicsConfig implements OGLGraphicsConfig { @@ -125,7 +127,7 @@ } public static CGLGraphicsConfig getConfig(CGraphicsDevice device, - int pixfmt) + int displayID, int pixfmt) { if (!cglAvailable) { return null; @@ -141,9 +143,7 @@ // surfaces/contexts, so we should first invalidate the current // Java-level context and flush the queue... OGLContext.invalidateCurrentContext(); - - cfginfo = getCGLConfigInfo(device.getCGDisplayID(), pixfmt, - kOpenGLSwapInterval); + cfginfo = getCGLConfigInfo(displayID, pixfmt, kOpenGLSwapInterval); if (cfginfo != 0L) { textureSize = nativeGetMaxTextureSize(); // 7160609: GL still fails to create a square texture of this @@ -259,8 +259,8 @@ @Override public String toString() { - int displayID = getDevice().getCGDisplayID(); - return ("CGLGraphicsConfig[dev="+displayID+",pixfmt="+pixfmt+"]"); + String display = getDevice().getIDstring(); + return ("CGLGraphicsConfig[" + display + ", pixfmt=" + pixfmt + "]"); } @Override