Print this page
Added gradle and cmake project

Split Close
Expand all
Collapse all
          --- old/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
          +++ new/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
↓ open down ↓ 54 lines elided ↑ open up ↑
  55   55  import javax.swing.JRootPane;
  56   56  import javax.swing.RootPaneContainer;
  57   57  import javax.swing.SwingUtilities;
  58   58  
  59   59  import com.apple.laf.ClientPropertyApplicator;
  60   60  import com.apple.laf.ClientPropertyApplicator.Property;
  61   61  import sun.awt.AWTAccessor;
  62   62  import sun.awt.AWTAccessor.ComponentAccessor;
  63   63  import sun.awt.AWTAccessor.WindowAccessor;
  64   64  import sun.java2d.SurfaceData;
       65 +import sun.java2d.metal.MTLSurfaceData;
  65   66  import sun.java2d.opengl.CGLSurfaceData;
  66   67  import sun.lwawt.LWLightweightFramePeer;
  67   68  import sun.lwawt.LWToolkit;
  68   69  import sun.lwawt.LWWindowPeer;
  69   70  import sun.lwawt.LWWindowPeer.PeerType;
  70   71  import sun.lwawt.PlatformWindow;
  71   72  import sun.util.logging.PlatformLogger;
  72   73  
  73   74  public class CPlatformWindow extends CFRetainedResource implements PlatformWindow {
  74   75      private native long nativeCreateNSWindow(long nsViewPtr,long ownerPtr, long styleBits, double x, double y, double w, double h);
↓ open down ↓ 974 lines elided ↑ open up ↑
1049 1050  
1050 1051      @Override
1051 1052      public long getLayerPtr() {
1052 1053          return contentView.getWindowLayerPtr();
1053 1054      }
1054 1055  
1055 1056      private void validateSurface() {
1056 1057          SurfaceData surfaceData = getSurfaceData();
1057 1058          if (surfaceData instanceof CGLSurfaceData) {
1058 1059              ((CGLSurfaceData)surfaceData).validate();
     1060 +        } else if (surfaceData instanceof MTLSurfaceData) {
     1061 +            ((MTLSurfaceData)surfaceData).validate();
1059 1062          }
1060 1063      }
1061 1064  
1062 1065      void flushBuffers() {
1063 1066          if (isVisible() && !nativeBounds.isEmpty() && !isFullScreenMode) {
1064 1067              try {
1065 1068                  LWCToolkit.invokeAndWait(new Runnable() {
1066 1069                      @Override
1067 1070                      public void run() {
1068 1071                          //Posting an empty to flush the EventQueue without blocking the main thread
↓ open down ↓ 292 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX