Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] (PR#7301) Unified and cached overview
Home

[Freeciv-Dev] (PR#7301) Unified and cached overview

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#7301) Unified and cached overview
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Jan 2004 09:37:45 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7301 >

> [i-freeciv-lists@xxxxxxxxxxxxx - Tue Jan 27 10:29:27 2004]:
> 
> On Mon, Jan 26, 2004 at 10:57:43PM -0800, Jason Short wrote:
> > 
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7301 >
> > 
> > > [i-freeciv-lists@xxxxxxxxxxxxx - Mon Jan 26 08:36:38 2004]:
> > 
> > > Also note that in the FS client an expose doesn't destroy the image
> > > drawn onto a canvas. The reason is that the FS client has an "expose
> > > buffer" for the whole screen. (This is also nice for doing screen
> > > dumps.)  So with this you will encode client specific mechanism into
> > > the common code.
> > 
> > But what you're doing also encodes a client-specific mechanism into the
> > common code, since if an additional blit IS required it's not easy for
> > the GUI code to do it.
> 
> I don't understand. What additional blit? The FS one? This isn't done
> by common client code nor by FS client code nor by the widget code. It
> is done by the backend. Every drawing is done to an off-screen buffer
> which holds the whole screen image. This buffer is then copied to the
> screen. This is done by request (when the widget code redraws a
> widget) or when an expose event arrives.

In the current GTK client the blit goes directly to the widget's GDK
window.  This basically means it goes directly to the screen.

But a more efficient GTK client implementation would have another
backing store.  In this case the blit would go onto the backing store,
and this backing store would have to be copied to the screen manually.

But who does this copying?  It should be that after all 4 rectangles are
drawn, the entire thing is copied to screen (or the gdk window is
invalidated to trigger an expose event).  But since the caller may be in
common code there's no hook for this operation.

I think this corresponds to your FS case.  You're drawing to a backend
buffer which is later flushed to the screen.  But who does the flushing?
 The backend does it on request or when an expose event arrives: but
without a hook into the overview draw function there's no way to request it.

jason



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