diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-01-20 16:55:57 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-01-21 16:51:46 +0200 |
commit | a7cacfc0b5f02d70cee913bc4ddb3c55d9b80e00 (patch) | |
tree | f196827ff36467542af3b327a9be61414d9bcc5c /src/mbgl/text/cross_tile_symbol_index.hpp | |
parent | f6279492ad2b4aa36d493f996c2d9e8808bbd9ab (diff) | |
download | qtlocation-mapboxgl-a7cacfc0b5f02d70cee913bc4ddb3c55d9b80e00.tar.gz |
[core] Do not index and place the off-screen symbols for overscaled tilesupstream/mikhail_cross_tile_index_performance
For overscaled tiles the viewport might be showing only a small part of the
tile, so we filter out the off-screen symbols to improve the performance.
Diffstat (limited to 'src/mbgl/text/cross_tile_symbol_index.hpp')
-rw-r--r-- | src/mbgl/text/cross_tile_symbol_index.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mbgl/text/cross_tile_symbol_index.hpp b/src/mbgl/text/cross_tile_symbol_index.hpp index 3b7c367726..8dfdb8466f 100644 --- a/src/mbgl/text/cross_tile_symbol_index.hpp +++ b/src/mbgl/text/cross_tile_symbol_index.hpp @@ -2,8 +2,9 @@ #include <mbgl/tile/tile_id.hpp> #include <mbgl/util/bitmask_operations.hpp> -#include <mbgl/util/geometry.hpp> #include <mbgl/util/constants.hpp> +#include <mbgl/util/geometry.hpp> +#include <mbgl/util/mat4.hpp> #include <mbgl/util/optional.hpp> #include <map> @@ -48,7 +49,7 @@ public: class CrossTileSymbolLayerIndex { public: CrossTileSymbolLayerIndex(uint32_t& maxCrossTileID); - bool addBucket(const OverscaledTileID&, SymbolBucket&); + bool addBucket(const OverscaledTileID&, const mat4& tileMatrix, SymbolBucket&); bool removeStaleBuckets(const std::unordered_set<uint32_t>& currentIDs); void handleWrapJump(float newLng); private: |