< prev index next >

src/java.desktop/windows/classes/sun/awt/windows/TranslucentWindowPainter.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -28,10 +28,11 @@
 import java.awt.Color;
 import java.awt.Graphics2D;
 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;
 import java.security.AccessController;
 import sun.awt.image.BufImgSurfaceData;

@@ -43,10 +44,11 @@
 import sun.java2d.pipe.hw.AccelGraphicsConfig;
 import sun.java2d.pipe.hw.AccelSurface;
 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.*;
 
 /**
  * This class handles the updates of the non-opaque windows.

@@ -301,12 +303,16 @@
         @Override
         protected boolean update(Image bb) {
             if (bb instanceof DestSurfaceProvider) {
                 Surface s = ((DestSurfaceProvider)bb).getDestSurface();
                 if (s instanceof AccelSurface) {
-                    final int w = bb.getWidth(null);
-                    final int h = bb.getHeight(null);
+                    AffineTransform tx = ((Graphics2D) bb.getGraphics()).
+                            getTransform();
+                    final int w = Region.
+                            clipScale(bb.getWidth(null), tx.getScaleX());
+                    final int h = Region.
+                            clipScale(bb.getHeight(null), tx.getScaleY());
                     final boolean arr[] = { false };
                     final AccelSurface as = (AccelSurface)s;
                     RenderQueue rq = as.getContext().getRenderQueue();
                     rq.lock();
                     try {
< prev index next >