< prev index next >

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

Print this page

        

@@ -72,10 +72,11 @@
         boolean isOpaque = true;
         if (pView != null) {
             pPeerData = pView.getAWTView();
             isOpaque = pView.isOpaque();
         }
+        CGLGraphicsConfig.refPConfigInfo(pConfigInfo);
         initOps(pConfigInfo, pPeerData, 0, 0, 0, isOpaque);
     }
 
     protected CGLSurfaceData(CGLLayer layer, CGLGraphicsConfig gc,
                              ColorModel cm, int type,int width, int height)

@@ -88,10 +89,11 @@
         boolean isOpaque = true;
         if (layer != null) {
             layerPtr = layer.getPointer();
             isOpaque = layer.isOpaque();
         }
+        CGLGraphicsConfig.refPConfigInfo(pConfigInfo);
         initOps(pConfigInfo, 0, layerPtr, 0, 0, isOpaque);
     }
 
     @Override //SurfaceData
     public GraphicsConfiguration getDeviceConfiguration() {

@@ -403,6 +405,11 @@
     public static void destroyOGLContext(long ctx) {
         if (ctx != 0L) {
             destroyCGLContext(ctx);
         }
     }
+
+    static void dispose(long pData, long pConfigInfo) {
+        OGLSurfaceData.dispose(pData, pConfigInfo);
+        CGLGraphicsConfig.deRefPConfigInfo(pConfigInfo);
+    }
 }
< prev index next >