Skip to content

Commit d6e6060

Browse files
committedOct 1, 2019
8231335: [macos] Delete unused and partly implemented JOGL/Java2D bridge
Reviewed-by: jdv
1 parent c1ac50d commit d6e6060

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed
 

‎src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java

-42
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@
2525

2626
package sun.java2d.opengl;
2727

28-
import java.awt.Graphics;
2928
import java.awt.GraphicsConfiguration;
3029
import java.awt.GraphicsDevice;
3130
import java.awt.GraphicsEnvironment;
3231
import java.awt.Image;
3332
import java.awt.Rectangle;
3433
import java.awt.image.ColorModel;
3534

36-
import sun.java2d.SunGraphics2D;
3735
import sun.java2d.SurfaceData;
38-
3936
import sun.lwawt.macosx.CPlatformView;
4037

4138
public abstract class CGLSurfaceData extends OGLSurfaceData {
@@ -342,43 +339,4 @@ public Object getDestination() {
342339
return offscreenImage;
343340
}
344341
}
345-
346-
// Mac OS X specific APIs for JOGL/Java2D bridge...
347-
348-
// given a surface create and attach GL context, then return it
349-
private static native long createCGLContextOnSurface(CGLSurfaceData sd,
350-
long sharedContext);
351-
352-
public static long createOGLContextOnSurface(Graphics g, long sharedContext) {
353-
SurfaceData sd = ((SunGraphics2D) g).surfaceData;
354-
if ((sd instanceof CGLSurfaceData) == true) {
355-
CGLSurfaceData cglsd = (CGLSurfaceData) sd;
356-
return createCGLContextOnSurface(cglsd, sharedContext);
357-
} else {
358-
return 0L;
359-
}
360-
}
361-
362-
// returns whether or not the makeCurrent operation succeeded
363-
static native boolean makeCGLContextCurrentOnSurface(CGLSurfaceData sd,
364-
long ctx);
365-
366-
public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx) {
367-
SurfaceData sd = ((SunGraphics2D) g).surfaceData;
368-
if ((ctx != 0L) && ((sd instanceof CGLSurfaceData) == true)) {
369-
CGLSurfaceData cglsd = (CGLSurfaceData) sd;
370-
return makeCGLContextCurrentOnSurface(cglsd, ctx);
371-
} else {
372-
return false;
373-
}
374-
}
375-
376-
// additional cleanup
377-
private static native void destroyCGLContext(long ctx);
378-
379-
public static void destroyOGLContext(long ctx) {
380-
if (ctx != 0L) {
381-
destroyCGLContext(ctx);
382-
}
383-
}
384342
}

0 commit comments

Comments
 (0)
Failed to load comments.