Print this page
Added gradle and cmake project

@@ -60,10 +60,11 @@
 import com.apple.laf.ClientPropertyApplicator.Property;
 import sun.awt.AWTAccessor;
 import sun.awt.AWTAccessor.ComponentAccessor;
 import sun.awt.AWTAccessor.WindowAccessor;
 import sun.java2d.SurfaceData;
+import sun.java2d.metal.MTLSurfaceData;
 import sun.java2d.opengl.CGLSurfaceData;
 import sun.lwawt.LWLightweightFramePeer;
 import sun.lwawt.LWToolkit;
 import sun.lwawt.LWWindowPeer;
 import sun.lwawt.LWWindowPeer.PeerType;

@@ -1054,10 +1055,12 @@
 
     private void validateSurface() {
         SurfaceData surfaceData = getSurfaceData();
         if (surfaceData instanceof CGLSurfaceData) {
             ((CGLSurfaceData)surfaceData).validate();
+        } else if (surfaceData instanceof MTLSurfaceData) {
+            ((MTLSurfaceData)surfaceData).validate();
         }
     }
 
     void flushBuffers() {
         if (isVisible() && !nativeBounds.isEmpty() && !isFullScreenMode) {