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

Print this page

        

@@ -56,11 +56,19 @@
     }
 
     @Override
     GLContext createGLContext(GLDrawable drawable, GLPixelFormat pixelFormat,
         GLContext shareCtx, boolean vSyncRequest) {
-        return new IOSGLContext(drawable, pixelFormat, shareCtx, vSyncRequest);
+        GLContext prismCtx = new IOSGLContext(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 IOSGLDrawable(pixelFormat);

@@ -120,10 +128,9 @@
     }
 
     // JIRA: RT-21739
     // This is a temporary mechanism to work well with Glass on iOS 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());
     }
 }