Only emit tile updated signals when the tile really changes

We only emit signals when the number of buckets increase (i.e. the
new data that arrived added a new bucket to the tile).

Also, if we try to reparse a partial tile but it is not possible, we
keep the flag up for trying to reparse it again on the next update,
because the data might have arrived after the bucket that is waiting
for the data was processed but before the end of the parsing.

Fixes #1458
This commit is contained in:
Thiago Marcos P. Santos
2015-05-11 18:41:44 +03:00
parent 4e7c97466c
commit aaaf1e4c14
7 changed files with 59 additions and 17 deletions

View File

@@ -82,6 +82,12 @@ Bucket* VectorTileData::getBucket(StyleLayer const& layer) {
return it->second.get();
}
size_t VectorTileData::countBuckets() const {
std::lock_guard<std::mutex> lock(bucketsMutex);
return buckets.size();
}
void VectorTileData::setBucket(StyleLayer const& layer, std::unique_ptr<Bucket> bucket) {
assert(layer.bucket);