pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using multiple surfaces for SmallMap?


From: Ingo Ruhnke
Subject: Re: Using multiple surfaces for SmallMap?
Date: 16 Oct 2002 03:02:47 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Gervase Lam <address@hidden> writes:

> Then, every "update", diff the "cache" with the ColMap.

Well, doing a 'diff' will take nearly the same time as simply copying
the data.

> If what is in the "cache" is different from what is on the ColMap,
> update the Small Map Surface line using Canvases.

Limiting the number of pixels of the canvas to update is easy, the
ColMap simply needs to track which parts of it got modified
(dirty-rectangle like) and tell that the smallmap.

> This would mean that most of the time only part of the SmallMap is
> converted from Canvases to Surfaces, which is the most time
> consuming part of the process.

I am absolutly not sure about this, I have really not much of an idea
what is happening under the hood of the Canvas->Surface conversion.
After all this is just a process of a few msec and one really should
benchmark it precisly before optimising the wrong spot.

If the canvas->surface conversion is the time consuming part, breaking
the surface down into smaller parts isn't much of a problem, the
spotmap already has all the code for that, it would just need to be
splited out correctly.

-- 
WWW:      http://pingus.seul.org/~grumbel/ 
Games:    http://pingus.seul.org/~grumbel/gamedesigns/
JabberID: address@hidden 
ICQ:      59461927




reply via email to

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