JDK-6749060 : LCD AA text rendered incorrectly when destination is non opaque (sw pipeline only)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-09-16
  • Updated: 2010-04-02
  • Resolved: 2009-01-09
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 JDK 7
6u12Fixed 7 b43Fixed
Related Reports
Relates :  
Relates :  
Description
Run this test on 6u10 on javafx1.0 runtime with Direct3D pipeline disabled
(if on windows), you'll see artifacts on the edges of the text rendered with
the effect:

import javafx.application.*;
import javafx.scene.paint.*;
import javafx.scene.*;
import javafx.scene.text.*;
import javafx.scene.effect.*;

Frame {
    title: "MyApplication"
    width: 600
    height: 200
    closeAction: function() {
        java.lang.System.exit( 0 );
    }
    visible: true

    scene: Scene {
        fill: Color.LIGHTBLUE
        content: [
            Text {
                effect: DropShadow{offsetX:3 offsetY:3 radius: 18 color:Color.WHITE}
                font: Font.font("Arial",FontWeight.BOLD,40.0)
                fill: Color.web("xF2F2F2")
                x: 20, y: 70
                content: "Text with the DropShadow"
                fill: Color.WHITE
            },
            Text {
                font: Font.font("Arial",FontWeight.BOLD,40.0)
                fill: Color.web("xF2F2F2")
                x: 20, y: 130
                content: "Text without the effect"
                fill: Color.WHITE
            }
        ]

    }
}

The issue is very similar to one described in 6728834, but this one is SW
pipeline only.

Comments
SUGGESTED FIX http://hg.openjdk.java.net/jdk7/2d/jdk/rev/3bc4d79d8123
10-10-2008

SUGGESTED FIX ------- SurfaceData.java ------- *** /tmp/sccs.003284 Tue Sep 16 11:38:25 2008 --- SurfaceData.java Tue Sep 16 11:38:05 2008 *************** *** 365,370 **** --- 365,371 ---- if (sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY && sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR && sg2d.clipState <= SunGraphics2D.CLIP_RECTANGULAR && + sg2d.surfaceData.getTransparency() == Transparency.OPAQUE && // This last test is a workaround until we fix loop selection // in the pipe validation sg2d.antialiasHint != SunHints.INTVAL_ANTIALIAS_ON) {
16-09-2008

EVALUATION The original test case for 6728834 didn't show the problem with SW-rendered text so I assumed that the sw lcd loops can handle destination with alpha. But the problem becomes apparent in the test in the descripion. The fix is the same - add a check for opaque destination to SurfaceData.canRenderLCDText().
16-09-2008