8144735: [hidpi] javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentPerPixelTranslucentGradient.java fails
Reviewed-by: psadhukhan, vadim
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/TranslucentWindowPainter.java Thu Sep 01 12:02:22 2016 +0300
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/TranslucentWindowPainter.java Thu Sep 01 16:18:14 2016 +0530
@@ -1,5 +1,5 @@
/*
- * 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
@@ -303,10 +303,10 @@
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;
+ final int w = as.getBounds().width;
+ final int h = as.getBounds().height;
RenderQueue rq = as.getContext().getRenderQueue();
rq.lock();
try {
--- a/jdk/test/javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentPerPixelTranslucentGradient.java Thu Sep 01 12:02:22 2016 +0300
+++ b/jdk/test/javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentPerPixelTranslucentGradient.java Thu Sep 01 16:18:14 2016 +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