summaryrefslogtreecommitdiff
path: root/src/mbgl/text/cross_tile_symbol_index.hpp
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2017-11-10 09:20:25 -0800
committerChris Loer <chris.loer@mapbox.com>2017-11-17 10:05:15 -0800
commit5bdee52e5c441e6daaae7cf9f320257d0ea3d031 (patch)
treefc107897c960eeb76263d74145ffb14ccfc3e50d /src/mbgl/text/cross_tile_symbol_index.hpp
parent3e074390b5afb0bf6d50b83c5327786bc011cd95 (diff)
downloadqtlocation-mapboxgl-5bdee52e5c441e6daaae7cf9f320257d0ea3d031.tar.gz
[core] Cleanup in response to review comments
Diffstat (limited to 'src/mbgl/text/cross_tile_symbol_index.hpp')
-rw-r--r--src/mbgl/text/cross_tile_symbol_index.hpp63
1 files changed, 30 insertions, 33 deletions
diff --git a/src/mbgl/text/cross_tile_symbol_index.hpp b/src/mbgl/text/cross_tile_symbol_index.hpp
index 0b8c5c4780..a32430d872 100644
--- a/src/mbgl/text/cross_tile_symbol_index.hpp
+++ b/src/mbgl/text/cross_tile_symbol_index.hpp
@@ -17,51 +17,48 @@ class SymbolInstance;
class RenderSymbolLayer;
class SymbolBucket;
-class IndexEntry {
- Point<float> anchorPoint;
-
-};
-
class IndexedSymbolInstance {
- public:
- IndexedSymbolInstance(uint32_t crossTileID_, Point<int64_t> coord_)
- : crossTileID(crossTileID_), coord(coord_) {};
- uint32_t crossTileID;
- Point<int64_t> coord;
+public:
+ IndexedSymbolInstance(uint32_t crossTileID_, Point<int64_t> coord_)
+ : crossTileID(crossTileID_), coord(coord_)
+ {}
+
+ uint32_t crossTileID;
+ Point<int64_t> coord;
};
class TileLayerIndex {
- public:
- TileLayerIndex(OverscaledTileID coord, std::vector<SymbolInstance>&, uint32_t bucketInstanceId);
+public:
+ TileLayerIndex(OverscaledTileID coord, std::vector<SymbolInstance>&, uint32_t bucketInstanceId);
- Point<int64_t> getScaledCoordinates(SymbolInstance&, const OverscaledTileID&);
- void findMatches(std::vector<SymbolInstance>&, const OverscaledTileID&);
-
- OverscaledTileID coord;
- uint32_t bucketInstanceId;
- std::map<std::u16string,std::vector<IndexedSymbolInstance>> indexedSymbolInstances;
+ Point<int64_t> getScaledCoordinates(SymbolInstance&, const OverscaledTileID&);
+ void findMatches(std::vector<SymbolInstance>&, const OverscaledTileID&);
+
+ OverscaledTileID coord;
+ uint32_t bucketInstanceId;
+ std::map<std::u16string,std::vector<IndexedSymbolInstance>> indexedSymbolInstances;
};
class CrossTileSymbolLayerIndex {
- public:
- CrossTileSymbolLayerIndex();
- void addBucket(const OverscaledTileID&, SymbolBucket&);
- bool removeStaleBuckets(const std::unordered_set<uint32_t>& currentIDs);
- private:
- std::map<uint8_t,std::map<OverscaledTileID,TileLayerIndex>> indexes;
- uint32_t maxBucketInstanceId = 0;
- static uint32_t maxCrossTileID;
+public:
+ CrossTileSymbolLayerIndex();
+ void addBucket(const OverscaledTileID&, SymbolBucket&);
+ bool removeStaleBuckets(const std::unordered_set<uint32_t>& currentIDs);
+private:
+ std::map<uint8_t,std::map<OverscaledTileID,TileLayerIndex>> indexes;
+ uint32_t maxBucketInstanceId = 0;
+ static uint32_t maxCrossTileID;
};
class CrossTileSymbolIndex {
- public:
- CrossTileSymbolIndex();
+public:
+ CrossTileSymbolIndex();
- bool addLayer(RenderSymbolLayer&);
-
- void reset();
- private:
- std::map<std::string,CrossTileSymbolLayerIndex> layerIndexes;
+ bool addLayer(RenderSymbolLayer&);
+
+ void reset();
+private:
+ std::map<std::string, CrossTileSymbolLayerIndex> layerIndexes;
};
} // namespace mbgl