--- old/src/java.desktop/windows/classes/sun/awt/windows/TranslucentWindowPainter.java 2016-08-03 13:58:15.459073000 +0530 +++ new/src/java.desktop/windows/classes/sun/awt/windows/TranslucentWindowPainter.java 2016-08-03 13:58:15.254970999 +0530 @@ -30,6 +30,7 @@ import java.awt.GraphicsConfiguration; import java.awt.Image; import java.awt.Window; +import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import java.awt.image.DataBufferInt; import java.awt.image.VolatileImage; @@ -45,6 +46,7 @@ import sun.security.action.GetPropertyAction; import static java.awt.image.VolatileImage.*; +import sun.java2d.pipe.Region; import static sun.java2d.pipe.hw.AccelSurface.*; import static sun.java2d.pipe.hw.ContextCapabilities.*; @@ -252,10 +254,13 @@ @Override protected Image getBackBuffer(boolean clear) { - int w = window.getWidth(); - int h = window.getHeight(); + GraphicsConfiguration gc = peer.getGraphicsConfiguration(); - + + AffineTransform tx = gc.getDefaultTransform(); + int w = Region.clipScale(window.getWidth(), tx.getScaleX()); + int h = Region.clipScale(window.getHeight(), tx.getScaleY()); + if (viBB == null || viBB.getWidth() != w || viBB.getHeight() != h || viBB.validate(gc) == IMAGE_INCOMPATIBLE) { --- old/test/javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentPerPixelTranslucentGradient.java 2016-08-03 13:58:15.983334999 +0530 +++ new/test/javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentPerPixelTranslucentGradient.java 2016-08-03 13:58:15.775231000 +0530 @@ -25,6 +25,7 @@ /* * @test + * @bug 8144735 * @key headful * @summary Check if a per-pixel translucent and translucent window is dragged * and resized by mouse correctly