United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6602861 D3D: Nimbus L&F: Painting broken on some D3D cards
JDK-6602861 : D3D: Nimbus L&F: Painting broken on some D3D cards

Details
Type:
Bug
Submit Date:
2007-09-10
Status:
Resolved
Updated Date:
2011-02-16
Project Name:
JDK
Resolved Date:
2007-09-18
Component:
client-libs
OS:
windows
Sub-Component:
2d
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u5
Fixed Versions:
6u10 (b04)

Related Reports
Relates:
Relates:

Sub Tasks

Description
Due to the order of some painting operations in the abstract Painter base class, rendering doesn't occur on some video cards when using direct3d.

                                    

Comments
EVALUATION

In AbstractRegionPainter we configure the graphics (and in this call set antialiasing to true) and then clear the buffer. This exposes a bug on many video cards, causing the VolatileImage to punt and not render. We need to reverse this logic, such that we clear the buffer and then configure the graphics context.
                                     
2007-09-10
EVALUATION

Another problem exposed by the Nimbus L&F in the Direct3D pipeline is
the way we map texels to pixels.
The naive way was to subtract .5 from the geometry (as suggested
in the D3D SDK articles). However, this approach is only valid for
pretransformed geometry.

Nimbus L&F does a lot of large factor scaling, so the problem with 
the above approach was apparent: with large scale -0.5 would
totally screw up the geometry after the transform is applied.

An alternate approach is to apply the texture transform: shift
the texture coordinates by +0.5 texel to achieve the same
effect. But in order to do this correctly we must take
the scale (and possibly others) factors from the device transform.

This works ok for scales, but unfortunately not for generic
transforms. More investigation is needed for the generic case.

This manifests in rendering vertical scrollbars in Nimbus L&F:
part of it is a scaled and rotated VI. On some boards the bottom
line of pixels doesn't get rendered which may have been caused
by the incompleteness of the approach.

For now we will put a partial fix which makes Nimbus work fine
on most boards and will work on the full fix.

Also, this fix doesn't address some texture bleeding on
nVidia FX 5xxxx series - most likely caused by scaling with bilinear 
filtering from non-pow2 textures.
                                     
2007-09-10
SUGGESTED FIX

http://sa.sfbay.sun.com/projects/java2d_data/6u5/6602861.0
                                     
2007-09-10
EVALUATION

Note that the fix for this bug is really only a work around.
The remaining issues will be tracked under a different bug id:
  6603000: D3D: incorrect texel to pixel mapping in some cases
                                     
2007-09-10



Hardware and Software, Engineered to Work Together