--- old/src/java.desktop/windows/classes/sun/java2d/d3d/D3DSurfaceData.java 2015-11-20 02:17:50.520742800 -0800 +++ new/src/java.desktop/windows/classes/sun/java2d/d3d/D3DSurfaceData.java 2015-11-20 02:17:50.239523600 -0800 @@ -703,20 +703,28 @@ } @Override - public boolean copyArea(SunGraphics2D sg2d, - int x, int y, int w, int h, int dx, int dy) - { - if (sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE && - sg2d.compositeState < SunGraphics2D.COMP_XOR) - { + public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, + int dx, int dy) { + final int state = sg2d.transformState; + if (state > SunGraphics2D.TRANSFORM_TRANSLATESCALE + || sg2d.compositeState >= SunGraphics2D.COMP_XOR) { + return false; + } + if (state <= SunGraphics2D.TRANSFORM_ANY_TRANSLATE) { x += sg2d.transX; y += sg2d.transY; - - d3dRenderPipe.copyArea(sg2d, x, y, w, h, dx, dy); - - return true; + } else if (state == SunGraphics2D.TRANSFORM_TRANSLATESCALE) { + final double[] coords = {x, y, x + w, y + h, x + dx, y + dy}; + sg2d.transform.transform(coords, 0, coords, 0, 3); + x = (int) Math.ceil(coords[0] - 0.5); + y = (int) Math.ceil(coords[1] - 0.5); + w = ((int) Math.ceil(coords[2] - 0.5)) - x; + h = ((int) Math.ceil(coords[3] - 0.5)) - y; + dx = ((int) Math.ceil(coords[4] - 0.5)) - x; + dy = ((int) Math.ceil(coords[5] - 0.5)) - y; } - return false; + d3dRenderPipe.copyArea(sg2d, x, y, w, h, dx, dy); + return true; } @Override