--- old/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java 2019-09-21 12:45:49.000000000 -0700 +++ new/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java 2019-09-21 12:45:49.000000000 -0700 @@ -25,7 +25,6 @@ package sun.java2d.opengl; -import java.awt.Graphics; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; @@ -33,9 +32,7 @@ import java.awt.Rectangle; import java.awt.image.ColorModel; -import sun.java2d.SunGraphics2D; import sun.java2d.SurfaceData; - import sun.lwawt.macosx.CPlatformView; public abstract class CGLSurfaceData extends OGLSurfaceData { @@ -342,43 +339,4 @@ return offscreenImage; } } - - // Mac OS X specific APIs for JOGL/Java2D bridge... - - // given a surface create and attach GL context, then return it - private static native long createCGLContextOnSurface(CGLSurfaceData sd, - long sharedContext); - - public static long createOGLContextOnSurface(Graphics g, long sharedContext) { - SurfaceData sd = ((SunGraphics2D) g).surfaceData; - if ((sd instanceof CGLSurfaceData) == true) { - CGLSurfaceData cglsd = (CGLSurfaceData) sd; - return createCGLContextOnSurface(cglsd, sharedContext); - } else { - return 0L; - } - } - - // returns whether or not the makeCurrent operation succeeded - static native boolean makeCGLContextCurrentOnSurface(CGLSurfaceData sd, - long ctx); - - public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx) { - SurfaceData sd = ((SunGraphics2D) g).surfaceData; - if ((ctx != 0L) && ((sd instanceof CGLSurfaceData) == true)) { - CGLSurfaceData cglsd = (CGLSurfaceData) sd; - return makeCGLContextCurrentOnSurface(cglsd, ctx); - } else { - return false; - } - } - - // additional cleanup - private static native void destroyCGLContext(long ctx); - - public static void destroyOGLContext(long ctx) { - if (ctx != 0L) { - destroyCGLContext(ctx); - } - } }