# HG changeset patch # User serb # Date 1460838551 -10800 # Node ID e929eeebe9b60b245bd5f70d3dd10cfd9a07198f # Parent c3d9835483f9713e6502bf5c325290e1c5f992f8 8154016: [macosx] Some HiDPI code can be removed Reviewed-by: alexsch, prr diff -r c3d9835483f9 -r e929eeebe9b6 jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.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 diff -r c3d9835483f9 -r e929eeebe9b6 jdk/src/java.desktop/macosx/classes/sun/lwawt/PlatformWindow.java --- 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. */ diff -r c3d9835483f9 -r e929eeebe9b6 jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java --- 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 diff -r c3d9835483f9 -r e929eeebe9b6 jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java --- 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) { } diff -r c3d9835483f9 -r e929eeebe9b6 jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java --- 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); } diff -r c3d9835483f9 -r e929eeebe9b6 jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java --- 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() { } diff -r c3d9835483f9 -r e929eeebe9b6 jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java --- 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()); }