<Swing Dev> [10] Review Request JDK - 8164811 : [hidpi]Tests fail with OpenGL Rendering

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Fri Nov 3 00:03:57 UTC 2017


Hi, Pankaj.
The BufferedImage class is a raster in the memory which should be 
unrelated to any grpahics config on the system. So this class should not 
be changed, but instead you should create a correct BI-as a back buffer 
which takes into account the size of the window and the scale of the GC.

On 31/10/2017 04:59, Pankaj Bansal wrote:
> Hi All,
> 
> Please review the fix for JDK 10.
> 
> Bug:
> 
> https://bugs.openjdk.java.net/browse/JDK-8164811
> 
> Webrev:
> 
> http://cr.openjdk.java.net/~pbansal/8164811/webrev.00/
> 
> Issue:
> 
> The tests given in the bug were failing when run with OpenGL and GDI.  
> This bug is related to https://bugs.openjdk.java.net/browse/JDK-8189257 
> which states that that HIDPI does not work with swing components when 
> Translucent window is used. Because of which all the tests in the bug 
> were failing.
> 
> Fix:
> 
> The TranslucentWindowPainter class was creating BufferedImage for OpenGL 
> (when /forceOpt/ is false) and GDI pipeline, but it is not considering 
> the device HiDPI scale. There is no way to create a scaled BufferedImage 
> because of which the scale value in BufImgSurfaceData is always 1. Made 
> changes to store graphics config in Buffered image, so that the 
> BufImgSurfaceManager can create BufImgSurfaceData with scale set properly.
> 
> This fix also fixes https://bugs.openjdk.java.net/browse/JDK-8189257
> 
> Regards,
> 
> Pankaj Bansal
> 


-- 
Best regards, Sergey.



More information about the swing-dev mailing list