-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
None
-
beta2
-
x86
-
windows_nt
On win32, different video cards perform a scaled Blt operation differently.
For example, most nVidia cards appear to do some sort of filtering
(possibly bilinear) during the scale operation, whereas some ATI cards
do simple nearest-neighbor.
This means that when Java2D takes different rendering paths in scaling
operations, the user may see different results on the screen, depending
on which rendering path was taken.
So, for example, when we scale from a BufferedImage to the screen, we
will use software loops that use a nearest-neighbor method. But when we
scale from a VolatileImage to the screen, we may use an accelerated
ddraw call that filters the image as it scales.
To see the problem reproduced, run the attached test. There are four
different tests (a matrix of source/dest images with BufferedImage
and VolatileImage). To switch between the tests, use the n and p keys
(next and previous). On any given test, you can enable a clip shape
during the scale (which will force a punt to the software routines)
by hitting the "c" key.
Note the difference in the last test (VI -> VI) from both the other tests
and from the clipping version of VI->VI. The non-clipped version shows a
filtered image with smooth lines. The clipped version shows the same
unfiltered version as we see in the other tests.
The problem with this different approach is that events may occur during
and application run (such as the app setting a user clip area or
a window event forcing a partial repaint (which sets a clip area) that
cause a scaled image to be partially rendered through hardware and partially
through software, giving potentially different appearances.