[cp-patches] FYI: Optimizing GdkGraphics2D.translate

Audrius Meskauskas audriusa at bluewin.ch
Mon May 29 07:13:15 UTC 2006

GdkGraphics2D.translate is written in ineffective "generic" way. The 
AffineTransform.translate could provide more optimal way of 
translation.  The inverse transform of the clip also need not be 
computed in so sophisticated way. Translate seems frequent when painting 
swing components.  The proposed patch rewrites GdkGraphics2D.translate 
and also adds the translation performance test to FillRect. With the 
translation test on, my computer gives about 210 ms for the current 
version of translate and about 130 ms for the rewritten version.

2006-05-29  Audrius Meskauskas  <AudriusA at Bioinformatics.org>

    * gnu/java/awt/peer/gtk/GdkGraphics2D.java (translate):
    * examples/gnu/classpath/examples/swing/FillRect.java (paintComponent):
    Optionally paint with translation. (createContent): Added option
    to test painting with translation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TranslateOptimiziations.patch
Type: text/x-patch
Size: 3695 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060529/88263a6e/TranslateOptimiziations.bin

More information about the Classpath-patches mailing list