JDK-6587863 : PIT: D3D: Pixelization issues with all Swing Components
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u5
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2003,windows_xp
  • CPU: x86
  • Submitted: 2007-08-01
  • Updated: 2010-10-14
  • Resolved: 2007-09-05
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 6
6u10 b03Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Lot of rendering issues seen with Swing components where some of the pixels are missing at the corners and some shapes such as circles in radio buttons are not properly formed. 

- Few pixels are missing in the right bottom corner of all the components such as JButton, JTextField, JTextArea, JInternalFrames, JMenu, JPopupMenu, Slider and so on.
- Radio buttons do not look good and the circular shape is not rendered properly.
- Some icons on the JFileChooser (list view/detail view) are not rendered properly
- Bullets in the HTML page are not rendered at all in JEditorPane

To reproduce the above issues, run SwingSet2 or the text printing demo attached to the bug report.

I have also attached the screenshots of all the above issues.
Java cup Icon on the Jinternal frame is incorrect in D3D.
Icons are missing in JSplitPane with D3D enabled by using 6u4 pit build. Ref:IconsMissingInSplitPane.png
Buttons and up/down arrow icons are not properly rendering in JSpinner with D3D enabled by using 6u4 pit build. Ref:SpinnerButtonsAndIcons.png
TitleBackground has some extra pixel in JInternalFrame with D3D enabled by using 6u4 pit build. Ref: IF_TitleBackgrd.png

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/java2d_data/6u5/6587863.1
27-08-2007

EVALUATION The gist of the fix is to separate the offset needed for proper mapping texels to pixels (which is done by offsetting the geometry by -0.5f for when texture mapping is used) from the fudge factors needed to make the lines look good. One thing is that FillRect() can also be used with texture mapping (like when rendering gradients and such), so I had to check the current paint mode. After I'd done that the results were great: I have good pixel match for simple primitives and texture mapping on all hardware I've tested so far - nvidia, ati and intel. The SimplePrimQuality now test passes. The full PolyVertTest test still fails with about 10 bad pixels - all in drawPoly case (where I do not adjust the geometry yet - it's pretty tricky). - this will be tracked by a different bug: 6597822: D3D: improve pipeline's rendering quality for some cases Note that this fix doesn't address all issues with the regression tests or sqe test suite. Part of the problem is that in some cases the software rendering may actually be incorrect - so the difference is expected. For example, since we use different pipelines for filling shapes with simple color and Paints, there are some differences in the resulting geometry. However, in the accelerated pipelines both of these cases go through the same code and thus produce the exact same geometry. So the automated image comparison tests (which check the difference between our sw and hw rendering) may fail. This likely means that the golden images will need to be updated with the new hw rendering results at some point.
27-08-2007