src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2007, 2014, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2007, 2015, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 36,45 **** --- 36,46 ---- import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.HashMap; import sun.awt.AWTAccessor; + import sun.awt.AWTAccessor.ComponentAccessor; import sun.awt.util.ThreadGroupUtils; import sun.awt.Win32GraphicsConfig; import sun.awt.windows.WComponentPeer; import sun.java2d.InvalidPipeException; import sun.java2d.ScreenUpdateManager;
*** 521,535 **** * Returns true if the component has heavyweight children. * * @param comp component to check for hw children * @return true if Component has heavyweight children */ - @SuppressWarnings("deprecation") private static boolean hasHWChildren(Component comp) { if (comp instanceof Container) { for (Component c : ((Container)comp).getComponents()) { ! if (c.getPeer() instanceof WComponentPeer || hasHWChildren(c)) { return true; } } } return false; --- 522,536 ---- * Returns true if the component has heavyweight children. * * @param comp component to check for hw children * @return true if Component has heavyweight children */ private static boolean hasHWChildren(Component comp) { + final ComponentAccessor acc = AWTAccessor.getComponentAccessor(); if (comp instanceof Container) { for (Component c : ((Container)comp).getComponents()) { ! if (acc.getPeer(c) instanceof WComponentPeer || hasHWChildren(c)) { return true; } } } return false;