diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-06-08 12:53:14 +0300 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-06-13 10:15:53 +0300 |
commit | 672ba516f225b231077baa0e3f6ae0749ee9c295 (patch) | |
tree | 08d3d8ae7c9ec2f3d22f6d46ab1d1cfcd80b5be1 /src/mbgl/annotation/annotation_manager.hpp | |
parent | f1598ff07e85608194fecffa7857acead5530371 (diff) | |
download | qtlocation-mapboxgl-672ba516f225b231077baa0e3f6ae0749ee9c295.tar.gz |
[core] mutex guard annotation manager for cross thread usage
Diffstat (limited to 'src/mbgl/annotation/annotation_manager.hpp')
-rw-r--r-- | src/mbgl/annotation/annotation_manager.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mbgl/annotation/annotation_manager.hpp b/src/mbgl/annotation/annotation_manager.hpp index 36f18e1aae..c2ed5ba89f 100644 --- a/src/mbgl/annotation/annotation_manager.hpp +++ b/src/mbgl/annotation/annotation_manager.hpp @@ -6,6 +6,7 @@ #include <mbgl/map/update.hpp> #include <mbgl/util/noncopyable.hpp> +#include <mutex> #include <string> #include <vector> #include <unordered_set> @@ -56,8 +57,12 @@ private: void removeAndAdd(const AnnotationID&, const Annotation&, const uint8_t); + void remove(const AnnotationID&); + std::unique_ptr<AnnotationTileData> getTileData(const CanonicalTileID&); + std::mutex mutex; + AnnotationID nextID = 0; using SymbolAnnotationTree = boost::geometry::index::rtree<std::shared_ptr<const SymbolAnnotationImpl>, boost::geometry::index::rstar<16, 4>>; |