modules/graphics/src/main/java/com/sun/prism/es2/MacGLFactory.java

Print this page

        

@@ -61,11 +61,19 @@
     }
 
     @Override
     GLContext createGLContext(GLDrawable drawable, GLPixelFormat pixelFormat,
         GLContext shareCtx, boolean vSyncRequest) {
-        return new MacGLContext(drawable, pixelFormat, shareCtx, vSyncRequest);
+        GLContext prismCtx = new MacGLContext(drawable, pixelFormat, shareCtx, vSyncRequest);
+
+        // JIRA: RT-21739
+        // TODO: This is a temporary mechanism to work well with Glass on Mac due
+        // to the CALayer work. Need to be removed in the early future for 3.0
+        HashMap devDetails = (HashMap) ES2Pipeline.getInstance().getDeviceDetails();
+        updateDeviceDetails(devDetails, prismCtx);
+
+        return prismCtx;
     }
 
     @Override
     GLDrawable createDummyGLDrawable(GLPixelFormat pixelFormat) {
         return new MacGLDrawable(pixelFormat);

@@ -123,10 +131,9 @@
     }
 
     // JIRA: RT-21739
     // TODO: This is a temporary mechanism to work well with Glass on Mac due
     // to the CALayer work. Need to be removed in the early future for 3.0
-    @Override
-    void updateDeviceDetails(HashMap deviceDetails, GLContext glContext) {
+    private void updateDeviceDetails(HashMap deviceDetails, GLContext glContext) {
            deviceDetails.put("contextPtr", glContext.getNativeHandle());
     }
 }