summaryrefslogtreecommitdiff
path: root/src/mbgl/text/cross_tile_symbol_index.hpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-01-14 20:59:22 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-01-21 10:34:42 +0200
commit4536e14d8994862e88b39ff639f029c75b1bc8b7 (patch)
tree5ef076cf544edba94c3c2cbefdb0847f8a496334 /src/mbgl/text/cross_tile_symbol_index.hpp
parent9bb1f898030a8bf73c11e53f498684e24a61ce60 (diff)
downloadqtlocation-mapboxgl-4536e14d8994862e88b39ff639f029c75b1bc8b7.tar.gz
[core] Consider symbol bucket leader id in cross-tile symbol indexing
Only buckets with the same leader id participate in `TileLayerIndex::findMatches()` in order to improve its performace. `TileLayerIndex` constness is fixed.
Diffstat (limited to 'src/mbgl/text/cross_tile_symbol_index.hpp')
-rw-r--r--src/mbgl/text/cross_tile_symbol_index.hpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mbgl/text/cross_tile_symbol_index.hpp b/src/mbgl/text/cross_tile_symbol_index.hpp
index 4e32698b3e..ddcdb814c6 100644
--- a/src/mbgl/text/cross_tile_symbol_index.hpp
+++ b/src/mbgl/text/cross_tile_symbol_index.hpp
@@ -31,13 +31,17 @@ public:
class TileLayerIndex {
public:
- TileLayerIndex(OverscaledTileID coord, std::vector<SymbolInstance>&, uint32_t bucketInstanceId);
+ TileLayerIndex(OverscaledTileID coord,
+ std::vector<SymbolInstance>&,
+ uint32_t bucketInstanceId,
+ std::string bucketLeaderId);
+
+ Point<int64_t> getScaledCoordinates(SymbolInstance&, const OverscaledTileID&) const;
+ void findMatches(SymbolBucket&, const OverscaledTileID&, std::set<uint32_t>&) const;
- Point<int64_t> getScaledCoordinates(SymbolInstance&, const OverscaledTileID&);
- void findMatches(std::vector<SymbolInstance>&, const OverscaledTileID&, std::set<uint32_t>&);
-
OverscaledTileID coord;
uint32_t bucketInstanceId;
+ std::string bucketLeaderId;
std::map<std::u16string,std::vector<IndexedSymbolInstance>> indexedSymbolInstances;
};