8144735: [hidpi] javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentPerPixelTranslucentGradient.java fails

Reviewed-by: psadhukhan, vadim
This commit is contained in:
Prem Balakrishnan 2016-09-01 16:18:14 +05:30
parent 6d5b6597cd
commit 63217bef37
2 changed files with 4 additions and 3 deletions

View File

@ -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 @@ abstract class TranslucentWindowPainter {
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 {

View File

@ -25,6 +25,7 @@ import java.awt.*;
/*
* @test
* @bug 8144735
* @key headful
* @summary Check if a per-pixel translucent and translucent window is dragged
* and resized by mouse correctly