Send intermediate tiles back even when we they are older.

Should improve interactivity and avoid jerky feedback.
This commit is contained in:
Michael Meeks 2016-09-01 21:17:56 +01:00
parent 8182dd8c54
commit 6bce292c44

View file

@ -140,17 +140,19 @@ std::unique_ptr<std::fstream> TileCache::lookupTile(const TileDesc& tile)
return nullptr;
}
void TileCache::saveTileAndNotify(const TileDesc& tile, const char *data, const size_t size, const bool priority)
void TileCache::saveTileAndNotify(const TileDesc& tile, const char *data, const size_t size, const bool /* priority */)
{
std::unique_lock<std::mutex> lock(_tilesBeingRenderedMutex);
std::shared_ptr<TileBeingRendered> tileBeingRendered = findTileBeingRendered(tile);
#if 0
if (!priority && tileBeingRendered && tileBeingRendered->getVersion() != tile.getVersion())
{
Log::trace() << "Skipping unexpected tile ver: " << tile.getVersion()
<< ", waiting for ver " << tileBeingRendered->getVersion() << Log::end;
return;
}
#endif
// Save to disk.
const auto cachedName = (tileBeingRendered ? tileBeingRendered->getCacheName()