[cp-patches] FYI: Return early in GdkGraphics2D.setColor

Audrius Meskauskas audriusa at bluewin.ch
Mon May 29 10:19:20 UTC 2006


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

    * gnu/java/awt/peer/gtk/GdkGraphics2D.java (copying constructor):
    Do not reuse fg in the constructor.

Sven de Marothy wrote:
> On Mon, 2006-05-29 at 09:23 +0200, Audrius Meskauskas wrote:
>   
>> This patch forces to return early if the color being set is the same as 
>> the current color. It improves the paint performance test result from 78 
>> till 66.
>>     
>
> Actually that screws up the copying constructor
> GdkGraphics2d(GdkGraphics2d c) which explicitly calls setColor(fg) for
> updating Cairo's internal state to the current color.
>   
Thanks for noticing.
> These patches are a bit moot though because the pending Graphics2D patch
> removes the class altogether. 
>
>   
A I understand, this code is not removed, it just now goes to the 
CairoGraphics2D.java. I will merge later.

Regards

Audrius.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: setColor2.patch
Type: text/x-patch
Size: 1048 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060529/ef97094c/setColor2.bin


More information about the Classpath-patches mailing list