summaryrefslogtreecommitdiff
path: root/src/mbgl/algorithm/generate_clip_ids.hpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-01-18 13:12:04 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-01-18 14:35:15 +0200
commitb83030aa9bb1a8d9f14ae8160698c1ee4d5a4c72 (patch)
tree26b9f39ef19bf0c1934f712f986df4600368dd97 /src/mbgl/algorithm/generate_clip_ids.hpp
parentd5659aa6647f1fc77159567bd22029a2dc9cd7a3 (diff)
downloadqtlocation-mapboxgl-b83030aa9bb1a8d9f14ae8160698c1ee4d5a4c72.tar.gz
[core] Remove tile sorting from the clip and mask algorithms
The tile sorting can be now removed from the algorithms, which calculate tile mask and clip ids, because their client code provides tiles being already sorted (in `TilePyramid`). This patch brings significant improvements to the Tile-related performance tests results, for example the `TileMaskGeneration` benchmark test runs 33 times faster with these changes applied.
Diffstat (limited to 'src/mbgl/algorithm/generate_clip_ids.hpp')
-rw-r--r--src/mbgl/algorithm/generate_clip_ids.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/algorithm/generate_clip_ids.hpp b/src/mbgl/algorithm/generate_clip_ids.hpp
index adcf87a72a..6950433578 100644
--- a/src/mbgl/algorithm/generate_clip_ids.hpp
+++ b/src/mbgl/algorithm/generate_clip_ids.hpp
@@ -25,8 +25,9 @@ private:
std::multimap<UnwrappedTileID, Leaf> pool;
public:
+ // The given vector must be sorted by id.
template <typename Renderable>
- void update(std::vector<std::reference_wrapper<Renderable>> renderables);
+ void update(std::vector<std::reference_wrapper<Renderable>> sortedRenderables);
std::map<UnwrappedTileID, ClipID> getClipIDs() const;
};