JDK-8166954 : Drawing artifacts with floating point UI scale
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • Submitted: 2016-09-30
  • Updated: 2017-10-06
  • Resolved: 2017-10-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10
10Resolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
The issue is created to track the discussed problems with floating point UI scale. See http://mail.openjdk.java.net/pipermail/2d-dev/2016-September/007718.html
-------------------------
Hello,

JDK9 comes with HiDPI support on Windows/Linux which is really great. As 
we gave it a try, we found it looking pretty good with an integer scale 
(2x) but revealed some rendering flaws with float scales.

Let me please demonstrate it with SwingSet2 + JDK9-ea-b137 + Windows 8.1 
in 150% scale (1.5f)

demo1 <http://cr.openjdk.java.net/%7Eant/hidpi_pics/demo1.png>

Dragging Frame-0 behind the pallet makes the pallet wavy.
Also, as Frame-0 moves it may leave traces.

demo2 <http://cr.openjdk.java.net/%7Eant/hidpi_pics/demo2.png>

Unstable look of a control. For instance, these two combos are decorated 
differently (and not perfectly).

demo3 <http://cr.openjdk.java.net/%7Eant/hidpi_pics/demo3.png>

Scrolling traces.

demo4 <http://cr.openjdk.java.net/%7Eant/hidpi_pics/demo4.png>

Menu traces.
Colored rendering artifacts.

Additionally, I'm attaching a test source & pics kindly provided by 
Renaud (cc'd) from AndroidStudio. The demo finely shows problems on the 
example of primitive rendering.

Scaling 100% 
<http://cr.openjdk.java.net/%7Eant/hidpi_pics/Scaling-100-percent.png>

Scaling 125% 
<http://cr.openjdk.java.net/%7Eant/hidpi_pics/Scaling-125-percent.png>

Scaling 150% 
<http://cr.openjdk.java.net/%7Eant/hidpi_pics/Scaling-150-percent.png>

It seems like most of the mentioned issues are caused by inaccurate 
rounding performed during the rendering cycle.
-------------------------
Comments
Not able to reproduce with windows 7. Need to verify with 8.1
08-08-2017

Targeted to 10 as an issue introduced in 8u or 9
17-02-2017

Approved by component triage team to defer
15-12-2016

SQE: OK to defer
15-12-2016

This is a request to defer the issue. The main part as drawing artifacts with the internal frames moving and list scrolling are fixed by JDK-8162350 There are still small artifacts with the JComboBox drawing http://cr.openjdk.java.net/%7Eant/hidpi_pics/demo2.png Squares in MinimalSwingApplication from the mentioned email could look rectangular when floating point scale is used just because they are painted using user space coordinates and their shape depends on the point from each it is drawn. If The first and last points are even then it is drawn as square. If one of the points is odd then it is drawn as a rectangle.
14-12-2016

One more case: Run the SwingSet2 demo with uiScale=1.5, go to the JSlider demo and move the vertical slider bar. There are some artifacts left.
03-11-2016