< 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
@@ -43,10 +43,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.SurfaceData;
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,14 +302,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);
final boolean arr[] = { false };
final AccelSurface as = (AccelSurface)s;
+ double scaleX = ((SurfaceData)as).getDefaultScaleX();
+ double scaleY = ((SurfaceData)as).getDefaultScaleY();
+ final int w = (int) Math.ceil(bb.getWidth(null) * scaleX);
+ final int h = (int) Math.ceil(bb.getHeight(null) * scaleY);
RenderQueue rq = as.getContext().getRenderQueue();
rq.lock();
try {
BufferedContext.validateContext(as);
rq.flushAndInvokeNow(new Runnable() {
< prev index next >