Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2000:
[Freeciv-Dev] Re: Memory leak fixed, new version uploaded
Home

[Freeciv-Dev] Re: Memory leak fixed, new version uploaded

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Tuomas Airaksinen <tuma@xxxxxxxxxxxx>
Cc: Nathan Lovell <lovell@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Memory leak fixed, new version uploaded
From: Andreas Kemnade <akemnade@xxxxxxxxxxx>
Date: Thu, 21 Dec 2000 12:58:10 +0100 (CET)

Tuomas Airaksinen writes:

 > >  > Yes, I noticed that GTK is EXTREMELY slow.  Is the native windows port
 > >  > available for testing, then?
 > >  > 
 > > I think the way to draw (pix/bit)-maps with masks (=Icons on windows)
 > > is quite slow because gdk_gc_set_mask is quite complex and
 > > slow.
 > 
 > Why does the same thing then work _very_ fast on linux?
 > 
 > > Compare that code with the code of DrawIcon in the wine sources.
 > > It's much simpler. As gdk_gc_set_mask is not only used for drawing
 > > pixmaps like in freeciv, it has to be universal and cannot be as
 > > simple as DrawIcon.
 > 
 > I think there must be a bug, and the reason is above. Why would 
 > the same code work slower on other environment?
 > 
On windoze:
The mask is AFAIK first converted to 8bpp and then it is splitted into
many small rectangles. Every rectangle is added to the clip region
using the win32 API. The win32 API has no function to add a clip mask.

On Linux:
The mask is simply passed to XSetClipMask. I do not know what
XSetClipMask does but I think that the X11 API is optimized to use
also clip masks and because of that it is much faster.

 > > I have put a test version at
 > > http://home.t-online.de/home/akemnade/incomplete-win-native.zip
 > 
 > I tested that, and saw that you had done very good work (although
 > some dialogs were still a bit ugly, but that's understandable). 
Sometimes I have to convert \n linebreaks to \r\n but I forgot to do
it in popup_notify_dialog.  The other problem is the poor layout
management of windows so I have to calculate everything by hand or I
have to use fixed positioning which breaks down i18n. If LC_ALL is not set,
freeciv uses the "user default language" of windows. You can try to
set LC_ALL to fr or de and the city dialog looks quite weird. I have
now invented some kind of hboxes and vboxes like gtk has to do the
layout management.

Greetings
Andreas Kemnade



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