JDK-5051225 : OGL: AutoJ2DGraphics AlphaCompositeTest fails on most platforms
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0,6u5
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: solaris_10,windows_xp
  • CPU: x86,sparc
  • Submitted: 2004-05-21
  • Updated: 2019-12-17
  • Resolved: 2019-12-17
Related Reports
Duplicate :  
Description
The AutoJ2DGraphics AlphaCompositeTest is failing if the test is run with OGL flag.

The test case draws a (5x4) grid of Alpha subtests.  The following subtests are failing (rendering is different without opengl flag) on Solaris10, RH AS3.0, and WinXP: (2,1) (2,3) (3,4).

When comparing results of different platforms there may be a few more subtests that are different.  The above three subtests are seen failing on all platforms.

- Attached is a standalone version of the AutoJ2DGraphics mediaserver test case AlphaCompositeTest.java.

- Also attached is another AutoJ2DGraphics test case AlphaCompositeComplexTest.java that also demonstrates the problem.

- This bug has turned up in tiger beta2 milestone testing as we are now able to compare golden images from all PIT platforms. The bug appears to have been present in earlier builds with opengl feature.

- Reproducable with recent and earlier Tiger builds including 1.5.0-beta2-b51


Steps to reproduce
==================
1) Set JAVA_HOME to recent Tiger build
2) Compile and run attached test case AlphaCompositeTest.java

3) Run the test with opengl
$JAVA_HOME/bin/java -Dsun.java2d.opengl=True AlphaCompositeTest

4) Run the test without opengl
$JAVA_HOME/bin/java AlphaCompositeTest

5) Compare the two renderings and observe that some of the subtests yield different results.

Comments
EVALUATION The differences between the X11- and OGL-produced results are due to the fact that we treat OGL surfaces as "opaque, but premultiplied", whereas we have historically treated other opaque surfaces, such as onscreen destinations, as "opaque, but non-premultiplied". After some analysis, we have found that the OGL results are more reasonable than those produced by the other pipelines, since one is more likely to see visible results when the extra alpha value is non-0xff. We should think about changing the way we treat our opaque surface types for Mustang, so that they are treated as premultiplied. In the meantime, this particular issue with the OGL pipeline should not be considered a bug since it is producing results consistent with the above assumptions. (Just to complicate matters, though, it should be noted that we cannot currently create a ColorModel instance that is both opaque and premultiplied; that issue will be resolved under another bugid in the Mustang timeframe.) ###@###.### 2004-05-27
27-05-2004