diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-06-17 15:04:10 +0300 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-07-09 11:43:46 +0300 |
commit | 57402314e1be3180ce6f67d8ba29c17aceba6b60 (patch) | |
tree | efe5a01b6a2ced775726c0407528230166365a71 /src/mbgl/geometry/feature_index.hpp | |
parent | d6c1c838eb0c612aa971740fc58cc2a2e1086f77 (diff) | |
download | qtlocation-mapboxgl-57402314e1be3180ce6f67d8ba29c17aceba6b60.tar.gz |
[core] Improve performance for query rendered features
- query rendered symbols only from layers that support it
- remove unnecessary iterations over vectors
Diffstat (limited to 'src/mbgl/geometry/feature_index.hpp')
-rw-r--r-- | src/mbgl/geometry/feature_index.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/geometry/feature_index.hpp b/src/mbgl/geometry/feature_index.hpp index cd041a7fdb..1a212761fa 100644 --- a/src/mbgl/geometry/feature_index.hpp +++ b/src/mbgl/geometry/feature_index.hpp @@ -67,7 +67,7 @@ public: const double scale, const RenderedQueryOptions& options, const UnwrappedTileID&, - const std::vector<const RenderLayer*>&, + const std::unordered_map<std::string, const RenderLayer*>&, const float additionalQueryPadding) const; static optional<GeometryCoordinates> translateQueryGeometry( @@ -82,7 +82,7 @@ public: std::unordered_map<std::string, std::vector<Feature>> lookupSymbolFeatures( const std::vector<IndexedSubfeature>& symbolFeatures, const RenderedQueryOptions& options, - const std::vector<const RenderLayer*>& layers, + const std::unordered_map<std::string, const RenderLayer*>& layers, const OverscaledTileID& tileID, const std::shared_ptr<std::vector<size_t>>& featureSortOrder) const; @@ -92,7 +92,7 @@ private: const IndexedSubfeature&, const RenderedQueryOptions& options, const CanonicalTileID&, - const std::vector<const RenderLayer*>&, + const std::unordered_map<std::string, const RenderLayer*>&, const GeometryCoordinates& queryGeometry, const TransformState& transformState, const float pixelsToTileUnits, |