8154016: [macosx] Some HiDPI code can be removed
authorserb
Sat, 16 Apr 2016 23:29:11 +0300
changeset 37700 e929eeebe9b6
parent 37699 c3d9835483f9
child 37701 ab17d4b56946
8154016: [macosx] Some HiDPI code can be removed Reviewed-by: alexsch, prr
jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java
jdk/src/java.desktop/macosx/classes/sun/lwawt/PlatformWindow.java
jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java
jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java
jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java
jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java	Sat Apr 16 23:29:11 2016 +0300
@@ -295,7 +295,7 @@
         if (f == null) {
             f = DEFAULT_FONT;
         }
-        return platformWindow.transformGraphics(new SunGraphics2D(getSurfaceData(), fg, bg, f));
+        return new SunGraphics2D(getSurfaceData(), fg, bg, f);
     }
 
     @Override
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/PlatformWindow.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/PlatformWindow.java	Sat Apr 16 23:29:11 2016 +0300
@@ -130,12 +130,6 @@
      */
     public void setSizeConstraints(int minW, int minH, int maxW, int maxH);
 
-    /**
-     * Transforms the given Graphics object according to the native
-     * implementation traits (insets, etc.).
-     */
-    public Graphics transformGraphics(Graphics g);
-
     /*
      * Installs the images for particular window.
      */
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java	Sat Apr 16 23:29:11 2016 +0300
@@ -31,7 +31,6 @@
 import sun.java2d.SurfaceData;
 import sun.java2d.opengl.CGLLayer;
 import sun.lwawt.LWWindowPeer;
-import sun.lwawt.LWWindowPeer.PeerType;
 import sun.lwawt.PlatformWindow;
 import sun.util.logging.PlatformLogger;
 
@@ -40,7 +39,8 @@
  */
 public class CPlatformEmbeddedFrame implements PlatformWindow {
 
-    private static final PlatformLogger focusLogger = PlatformLogger.getLogger("sun.lwawt.macosx.focus.CPlatformEmbeddedFrame");
+    private static final PlatformLogger focusLogger = PlatformLogger.getLogger(
+            "sun.lwawt.macosx.focus.CPlatformEmbeddedFrame");
 
     private CGLLayer windowLayer;
     private LWWindowPeer peer;
@@ -162,11 +162,6 @@
     public void setSizeConstraints(int minW, int minH, int maxW, int maxH) {}
 
     @Override
-    public Graphics transformGraphics(Graphics g) {
-        return g;
-    }
-
-    @Override
     public void updateIconImages() {}
 
     @Override
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java	Sat Apr 16 23:29:11 2016 +0300
@@ -27,7 +27,6 @@
 
 import java.awt.Font;
 import java.awt.FontMetrics;
-import java.awt.Graphics;
 import java.awt.GraphicsDevice;
 import java.awt.GraphicsEnvironment;
 import java.awt.Insets;
@@ -153,11 +152,6 @@
     }
 
     @Override
-    public Graphics transformGraphics(Graphics g) {
-        return null;
-    }
-
-    @Override
     public void setAlwaysOnTop(boolean isAlwaysOnTop) {
     }
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Sat Apr 16 23:29:11 2016 +0300
@@ -741,12 +741,6 @@
     }
 
     @Override
-    public Graphics transformGraphics(Graphics g) {
-        // is this where we can inject a transform for HiDPI?
-        return g;
-    }
-
-    @Override
     public void setAlwaysOnTop(boolean isAlwaysOnTop) {
         setStyleBits(ALWAYS_ON_TOP, isAlwaysOnTop);
     }
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java	Sat Apr 16 23:29:11 2016 +0300
@@ -27,7 +27,6 @@
 
 import java.awt.Font;
 import java.awt.FontMetrics;
-import java.awt.Graphics;
 import java.awt.GraphicsDevice;
 import java.awt.Insets;
 import java.awt.MenuBar;
@@ -171,11 +170,6 @@
     }
 
     @Override
-    public Graphics transformGraphics(Graphics g) {
-        return g;
-    }
-
-    @Override
     public void updateIconImages() {
     }
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Sat Apr 16 23:29:11 2016 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -364,8 +364,8 @@
             return null;
         }
 
-        return transformGraphics(new SunGraphics2D(sd, SystemColor.windowText,
-                SystemColor.window, ownerWindow.getFont()));
+        return new SunGraphics2D(sd, SystemColor.windowText, SystemColor.window,
+                                 ownerWindow.getFont());
     }