8231335: [macos] Delete unused and partly implemented JOGL/Java2D bridge
authorserb
Mon, 30 Sep 2019 22:36:03 -0700
changeset 58596 acbc26afebb6
parent 58595 fa9f28a0e175
child 58597 4ff14948c6a1
8231335: [macos] Delete unused and partly implemented JOGL/Java2D bridge Reviewed-by: jdv
src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java
--- a/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java	Wed Sep 25 22:45:43 2019 +0100
+++ b/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java	Mon Sep 30 22:36:03 2019 -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);
-        }
-    }
 }