changeset 14328:7f390c98c765

8154016: [macosx] Some HiDPI code can be removed Reviewed-by: alexsch, prr
author serb
date Sat, 16 Apr 2016 23:29:11 +0300
parents 902e7cbe0acd
children 732f9c63e037
files src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java src/java.desktop/macosx/classes/sun/lwawt/PlatformWindow.java src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java
diffstat 7 files changed, 6 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/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/src/java.desktop/macosx/classes/sun/lwawt/PlatformWindow.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/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/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/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/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/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/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/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/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/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/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Fri Apr 15 10:25:11 2016 -0700
+++ b/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());
     }