only update the render order array when there are changes to tiles

This commit is contained in:
Konstantin Käfer
2015-08-20 15:34:32 -04:00
parent 038b65eded
commit fd98607c5f
4 changed files with 27 additions and 21 deletions

View File

@@ -529,9 +529,14 @@ void Source::invalidateTiles(const std::unordered_set<TileID, TileID::Hash>& ids
}
void Source::updateTilePtrs() {
tilePtrs.clear();
std::vector<Tile*> newPtrs;
for (const auto& pair : tiles) {
tilePtrs.push_back(pair.second.get());
newPtrs.push_back(pair.second.get());
}
if (tilePtrs != newPtrs) {
tilePtrs = newPtrs;
emitTileLoaded(true);
}
}