Print this page
Added gradle and cmake project

Split Close
Expand all
Collapse all
          --- old/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
          +++ new/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
↓ open down ↓ 100 lines elided ↑ open up ↑
 101  101  
 102  102  import com.apple.laf.AquaMenuBarUI;
 103  103  import sun.awt.AWTAccessor;
 104  104  import sun.awt.AppContext;
 105  105  import sun.awt.CGraphicsConfig;
 106  106  import sun.awt.CGraphicsDevice;
 107  107  import sun.awt.LightweightFrame;
 108  108  import sun.awt.SunToolkit;
 109  109  import sun.awt.datatransfer.DataTransferer;
 110  110  import sun.awt.util.ThreadGroupUtils;
      111 +import sun.java2d.macos.MacOSFlags;
      112 +import sun.java2d.metal.MTLRenderQueue;
 111  113  import sun.java2d.opengl.OGLRenderQueue;
 112  114  import sun.lwawt.LWComponentPeer;
 113  115  import sun.lwawt.LWCursorManager;
 114  116  import sun.lwawt.LWToolkit;
 115  117  import sun.lwawt.LWWindowPeer;
 116  118  import sun.lwawt.LWWindowPeer.PeerType;
 117  119  import sun.lwawt.PlatformComponent;
 118  120  import sun.lwawt.PlatformDropTarget;
 119  121  import sun.lwawt.PlatformWindow;
 120  122  import sun.lwawt.SecurityWarningWindow;
↓ open down ↓ 348 lines elided ↑ open up ↑
 469  471      }
 470  472  
 471  473      @Override
 472  474      public Insets getScreenInsets(final GraphicsConfiguration gc) {
 473  475          return ((CGraphicsConfig) gc).getDevice().getScreenInsets();
 474  476      }
 475  477  
 476  478      @Override
 477  479      public void sync() {
 478  480          // flush the OGL pipeline (this is a no-op if OGL is not enabled)
 479      -        OGLRenderQueue.sync();
      481 +        if (MacOSFlags.isMetalEnabled()) {
      482 +            MTLRenderQueue.sync();
      483 +        } else {
      484 +            OGLRenderQueue.sync();
      485 +        }
 480  486          // setNeedsDisplay() selector was sent to the appropriate CALayer so now
 481  487          // we have to flush the native selectors queue.
 482  488          flushNativeSelectors();
 483  489      }
 484  490  
 485  491      @Override
 486  492      public RobotPeer createRobot(Robot target, GraphicsDevice screen) {
 487  493          return new CRobot(target, (CGraphicsDevice)screen);
 488  494      }
 489  495  
↓ open down ↓ 516 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX