diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-01-14 20:59:22 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-01-22 14:30:26 +0200 |
commit | 4735845a6ee4baad9306b8d5150b093fccdd11a2 (patch) | |
tree | 57ff5febd61c9672587ca1489fd765bdae5f0310 /src/mbgl/text/cross_tile_symbol_index.hpp | |
parent | 93f19b8daaab5f0ed4a1bd24beaca9fa4aabb551 (diff) | |
download | qtlocation-mapboxgl-4735845a6ee4baad9306b8d5150b093fccdd11a2.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.hpp | 12 |
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; }; |