diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-06 13:27:56 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-01 11:16:57 -0800 |
commit | bafbf6c04b1bfd5da84411f52a72e26783f3bcb7 (patch) | |
tree | bed0d33eb2c7be56aee11c33a8a7c20ba10e5a6a /src/mbgl/style/style.hpp | |
parent | 96f5ae7cb886a3312d1718133e25e0e9b565179d (diff) | |
download | qtlocation-mapboxgl-bafbf6c04b1bfd5da84411f52a72e26783f3bcb7.tar.gz |
[core] Don't share util::ptr<StyleLayer> across threads
Diffstat (limited to 'src/mbgl/style/style.hpp')
-rw-r--r-- | src/mbgl/style/style.hpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mbgl/style/style.hpp b/src/mbgl/style/style.hpp index c2cb9e397c..d9cd137767 100644 --- a/src/mbgl/style/style.hpp +++ b/src/mbgl/style/style.hpp @@ -65,11 +65,12 @@ public: } Source* getSource(const std::string& id) const; - StyleLayer* getLayer(const std::string& id) const; - void addSource(std::unique_ptr<Source>); - void addLayer(util::ptr<StyleLayer>); - void addLayer(util::ptr<StyleLayer>, const std::string& beforeLayerID); + + std::vector<std::unique_ptr<StyleLayer>> getLayers() const; + StyleLayer* getLayer(const std::string& id) const; + void addLayer(std::unique_ptr<StyleLayer>); + void addLayer(std::unique_ptr<StyleLayer>, const std::string& beforeLayerID); void removeLayer(const std::string& layerID); void dumpDebugLogs() const; @@ -82,10 +83,10 @@ public: std::unique_ptr<LineAtlas> lineAtlas; std::vector<std::unique_ptr<Source>> sources; - std::vector<util::ptr<StyleLayer>> layers; + std::vector<std::unique_ptr<StyleLayer>> layers; private: - std::vector<util::ptr<StyleLayer>>::const_iterator findLayer(const std::string& layerID) const; + std::vector<std::unique_ptr<StyleLayer>>::const_iterator findLayer(const std::string& layerID) const; // GlyphStore::Observer implementation. void onGlyphRangeLoaded() override; |