JDK-6602861 : D3D: Nimbus L&F: Painting broken on some D3D cards
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.
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
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.
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.