forked from organicmaps/organicmaps
Now tile renderer only move tile from set to cache without lock tile in cache.
On precaching tiles from n-1 zoom level (n current zoom level) we call CacheActiveTile and lock it in cache. By this case cache grow up very fast
This commit is contained in:
parent
71c10ab1a0
commit
3f9ee124da
2 changed files with 0 additions and 16 deletions
|
@ -340,18 +340,6 @@ TileCache & TileRenderer::GetTileCache()
|
|||
return m_tileCache;
|
||||
}
|
||||
|
||||
Tile const * TileRenderer::GetTile(const Tiler::RectInfo & rectInfo)
|
||||
{
|
||||
TileStructuresLockGuard lock(m_tileCache, m_tileSet);
|
||||
|
||||
CacheActiveTile(rectInfo);
|
||||
|
||||
if (m_tileCache.HasTile(rectInfo))
|
||||
return &m_tileCache.GetTile(rectInfo);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void TileRenderer::CacheActiveTile(Tiler::RectInfo const & rectInfo)
|
||||
{
|
||||
if (m_tileSet.HasTile(rectInfo))
|
||||
|
@ -366,8 +354,6 @@ void TileRenderer::CacheActiveTile(Tiler::RectInfo const & rectInfo)
|
|||
}
|
||||
|
||||
m_tileCache.AddTile(rectInfo, TileCache::Entry(tile, m_resourceManager));
|
||||
m_tileCache.LockTile(rectInfo);
|
||||
|
||||
m_tileSet.RemoveTile(rectInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,8 +103,6 @@ public:
|
|||
core::CommandsQueue::Chain const & afterTileFns = core::CommandsQueue::Chain());
|
||||
/// get tile cache.
|
||||
TileCache & GetTileCache();
|
||||
/// get tile from render if tile already rendered, otherwise return NULL
|
||||
Tile const * GetTile(Tiler::RectInfo const & rectInfo);
|
||||
/// Move active tile to cache if tile alrady rendered
|
||||
void CacheActiveTile(Tiler::RectInfo const & rectInfo);
|
||||
/// wait on a condition variable for an empty queue.
|
||||
|
|
Loading…
Add table
Reference in a new issue