<Swing Dev> [OpenJDK 2D-Dev] [10] Review Request 8187367: Numerous swing display problems with scaled displays on Windows

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Sep 18 19:01:05 UTC 2017


Hi, Semyon.
Is it possible to write a test case for this issue? It will be helpful 
to understand the bug and a fix.

On 9/18/17 09:36, Semyon Sadetsky wrote:
> Hello,
> 
> Please review fix for JDK10 (in Swing and Java2D):
> 
> bug: https://bugs.openjdk.java.net/browse/JDK-8187367
> 
> webrev: http://cr.openjdk.java.net/~ssadetsky/8187367/webrev.00/
> 
> Swing apps  may have artifacts on HiDPI screens with fractional scales. 
> There are several issues which may cause various artifacts but the 
> current fix only eliminates one type of artifacts the vertical and 
> horizontal lines on painted surfaces (other issues are addressed by [1] 
> and [2]). This issue was introduced after 8073320 and then incorrectly 
> fixed in 8163193.
> 
> The root cause is the painter pattern is drawn on a wrongly sized and 
> scaled image in case the image is an off-screen volatile image. The 
> painter doesn't take into account the volatile image inner scale 
> transformation which is not an identity in case of HiDPI , so the 
> resulting image is drawn on of off-screen surface that in the scale 
> times bigger than it is actually necessary. Since such images are cached 
> this was waste of RAM. Also, the bounds sent to the painter class don't 
> take into account the transformation rounding error the latter caused 
> artifacts on the drawing edges.
> 
> --Semyon
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8187585
> 
> [2] https://bugs.openjdk.java.net/browse/JDK-8187586
> 


-- 
Best regards, Sergey.



More information about the swing-dev mailing list