Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: GTK+ client speedup patch (+ optional scrollbuttons)
Home

[Freeciv-Dev] Re: GTK+ client speedup patch (+ optional scrollbuttons)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Kevin Brown <kevin@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: GTK+ client speedup patch (+ optional scrollbuttons)
From: Thue <thue@xxxxxxx>
Date: Mon, 20 Aug 2001 12:38:12 +0200

On Monday 20 August 2001 00:26, Kevin Brown wrote:
> Thue <thue@xxxxxxx> wrote:
> > On Thursday 09 August 2001 05:31, Kevin Brown wrote:
> > > Comments?
> >
> > An ortogonal optimization you could implement would be to not
> > redraw the overlap from the old center to the new one when
> > recentering the map. This should give a huge performance
> > improvement on scrolling.
>
> Yeah, I've been thinking along those lines, too.  I guess it would
> have to calculate which part of the map will still be visible, then
> blit it to its new location, then fill in the rest using the normal
> tile-drawing code (using the cache if necessary/possible).
>
> It means the code might have to deal with overlap between the old and
> new regions (anyone know if gdk_draw_pixmap() does the right thing
> for this already?).

In all probability it does not do the thign we want. (assumed from 
here, you might want to check it anyway)

> I guess I can try implementing this and see how it goes.  Should be
> interesting.

I think a nice way of implementing this would be to have a 
map_canvas_store2 in addition to map_canvas store. map_canvas_store is 
used as usual, except when we recenter, where we do:

-switch map_canvas_store and map_canvas_store2
-copy the overlapped area from map_canvas_store to map_canvas_store2
-draw the test of the map

-Thue (Who is not on the list, but was CCed and couldn't help answering)


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