< prev index next >
src/java.desktop/windows/classes/sun/awt/windows/TranslucentWindowPainter.java
Print this page
*** 28,37 ****
--- 28,38 ----
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,52 ****
--- 44,54 ----
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.
*** 250,263 ****
super(peer);
}
@Override
protected Image getBackBuffer(boolean clear) {
! int w = window.getWidth();
! int h = window.getHeight();
GraphicsConfiguration gc = peer.getGraphicsConfiguration();
if (viBB == null || viBB.getWidth() != w || viBB.getHeight() != h ||
viBB.validate(gc) == IMAGE_INCOMPATIBLE)
{
flush();
--- 252,268 ----
super(peer);
}
@Override
protected Image getBackBuffer(boolean clear) {
!
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)
{
flush();
< prev index next >