bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug awt/24116] New: Graphics.drawImage() problems


From: hendrich at informatik dot uni-hamburg dot de
Subject: [Bug awt/24116] New: Graphics.drawImage() problems
Date: 29 Sep 2005 09:22:29 -0000

The attached testcase demonstrates that image drawing is still broken on
current classpath cvs (2005.09.29). Also, we have a major performance problem.
This issue is likely to harm all applications that use image drawing for
custom GUI components (like buttons) and for their own double buffering.

For example, starting the attached testcase on a harmless (CNN ricebag fake)
test image of 600x461 pixels takes 7 MINUTES on my Athlon 2600+, which is
over 600 times slower than JDK 1.4.2. (You would probably not want to test
the application with typical 5 megapixel digicam images right now)

---

The attached test application expects the name of an input image, loads that 
image, and then slices the input image into a matrix of tiles. Once the tiles
are ready, it paints the tiles (effectively restoring the original image, 
plus some extra lines to show the boundaries). Optionally, you can specify 
the size of the tiles.

For use as a regression tester, the application mixes randomly chosen
BufferedImages and the image format returned by Frame.createImage(),
and uses both the standard and the scaling variants of drawImage().
Edit the parameters of the Math.random() calls (0.0, 1.0 - or remove them)
to enforce testing with one variant of Image, and one variant of drawImage.

---

See attached screenshots for a comparison of classpath under jamvm 1.3.2 vs
the JDK. Additional testing reveals that the basic drawing operation works, 
while the 'synchronous' version is broken:

g.drawImage( image, x, y, observer )                              works.
g.drawImage( image, dx1,dy1,dx2,dy2, sx1,sy1,sx2,sy2, observer )  is broken.


/opt/jamvm/bin/jamvm -mx200m PR24yyy ~/images/ricebag.jpg
...
image loading took 22 msecs.
image drawing took 393112 msecs.

/opt/jdk142/bin/java PR24yyy ~/images/ricebag.jpg
...
image loading took 168 msecs.
image drawing took 587 msecs.

-- 
           Summary: Graphics.drawImage() problems
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: awt
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hendrich at informatik dot uni-hamburg dot de
                CC: bug-classpath at gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24116




reply via email to

[Prev in Thread] Current Thread [Next in Thread]