<AWT Dev> [10] JDK-8189257: Enabling Translucent Frame with setBackground disables HiDPI

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Sat Oct 28 05:26:54 UTC 2017

Hi, Shashi.
It seems that the changes in WWindowPeer.updateWindow() will update the 
size of the window. Note that if the size of the window is 100x100 and 
the scale is 2, then the real size in device space is 200x200 but in the 
user space the size is 100x100. Window.set/getSize should work in the 
user space.

There is a difference in the implementation of BufferedImage and 
VolatileImage. VolatileImage unlike BI is always internally scaled. It 
means that if the VolatileImage size is 100x100 and the scale of the 
graphicsConfig is 2, then the real size of the native texture will be 
200x200. Can you please confirm that the changes in VIWindowPainter are 
necessary. It could be possible that we will create the image which 2 
times bigger than necessary.

On 27/10/2017 05:49, Shashidhara Veerabhadraiah wrote:
> Hi All, Please review a fix for the below bug:
> Bug: https://bugs.openjdk.java.net/browse/JDK-8189257
> Webrev: http://cr.openjdk.java.net/~sveerabhadra/8189257/webrev.00/
> Summary: With setBackground on for a window and system DPI != 100% 
> causes HiDPI disabled hence producing a window of size equivalent to 
> 100% DPI though it is not the case. Fixes has been done to update the 
> window size and buffered image size increase\decrease proportionately 
> per the system DPI. Below are the results. Now the window size 
> dynamically syncs with system DPI change. Please note the font size has 
> not been changed proportionately and am looking to find a solution in 
> further review passes.
> Thanks and regards,
> Shashi

Best regards, Sergey.

More information about the awt-dev mailing list