[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: KisTileMediator
From:       Casper Boemann <cbr () boemann ! dk>
Date:       2004-08-11 21:23:10
Message-ID: 200408112323.12438.cbr () boemann ! dk
[Download RAW message or body]

On Wednesday 11 August 2004 19:30, Boudewijn Rempt wrote:
> I noticed that Adrian was hacking a bit on KisTileMediator. This class
> contains references to every tile in existence and is only used to
> determine the x,y coordinates of a given tile in the rendering stack:
>
>
> void KisTileMgr::tileCoord(const KisTileSP& tile, QPoint& coord)
> {
> 	Q_INT32 tilenum = m_mediator -> tileNum(tile, this);
>
> 	if (tilenum == TILE_NOT_ATTACHED)
> 		return;
>
> 	coord.setX(TILE_WIDTH * (tilenum % m_ntileCols));
> 	coord.setY(TILE_HEIGHT * (tilenum / m_ntileCols));
> }
>
> I'm wondering whether we really need this. It's a relatively expensive way
> of discovering the x,y of a given tile, I feel.

we sure don't need it, especially since tiles are never again public 
knowledge.

> In other news: I'm removing the validate() calls that were originally
> intended to signal the tile manager to load tiles from disk back into
> memory. I feel that in any case the tile manager clients shouldn't have to
> worry their pretty little heads about virtual memory management, and
> besides, it isn't used for anything useful at present.
yes,yes yes

> Same with the tile's 
> dirty flag.
and yes :-)

-- 
best regards
Casper Boemann
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic