JDK-6728834 : D3D/OGL: LCD AA text becomes bold and blurred when rendering to a non-opaque destination
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2008-07-23
  • Updated: 2010-04-02
  • Resolved: 2008-09-23
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.
6u10 b31Fixed 7Fixed
Related Reports
Relates :  
Relates :  
I have an Undecorated JFrame with a JCheckbox added to it. On clicking the checkbox, I make the JFrame transparent. When I do this on Vista, I see the label of the checkbox becoming bold & blurred. Looks as if the antialias is removed. Looks a bit odd.

I reproduced it on WinVista Home Premium with Aero enabled, using jdk6u10-b27. This machine is installed with ATI Radeon X1600 and a LCD monitor. Reproducible independent of look and feels. I could not reproduce this on WinXP.

I have attached a sample test and the screenshots (before and after making the window transparent).

SUGGESTED FIX http://sa.sfbay.sun.com/projects/java2d_data/6u11/6728834.0

EVALUATION Another point to make: the test which comes with this bug specifically makes the checkbox non-opaque so it doesn't fill the background and the text is rendered to the part of the (translucent) destination image with alpha 0x00. If the checkbox is opaque, the painting first fills the background with non-translucent color, and the text is rendered on top, and appears fine (because of how the math in the shader works out).

EVALUATION Reproducible on XP as well. The problem is not related to transparent toplevels. The issue is in rendering LCD AA text into a non-opaque destination with the D3D pipeline. The pipeline doesn't support LCD AA text rendering in modes requring compositing but D3DSurfaceData.canRenderLCDText method misses the case where the destination is non-opaque. The OpenGL pipeline has the same issue. We need to add "dest surface is opaque" to the condition in canRenderLCDText in D3D/OGLSurfaceData.

EVALUATION Not reproducible with option -Dsun.java2d.noddraw=true, transferring to Java2D team.