diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-11-20 15:28:04 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-12-01 11:49:02 +0200 |
commit | a1f714bd373b1ab2836e69321944746b72fe1e37 (patch) | |
tree | d2f59c0be90623e5aaa1bdd43ed9f6cea192cf69 /src | |
parent | 8d3fd199b26c770c262141e736ccf4c7830c22f6 (diff) | |
download | qtlocation-mapboxgl-a1f714bd373b1ab2836e69321944746b72fe1e37.tar.gz |
[core] Do not use uv::rwlock on Style
It was being used as a normal mutex anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/style/style.cpp | 3 | ||||
-rw-r--r-- | src/mbgl/style/style.hpp | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp index 1932d9064b..b7533db4a3 100644 --- a/src/mbgl/style/style.cpp +++ b/src/mbgl/style/style.cpp @@ -30,7 +30,6 @@ Style::Style(MapData& data_) spriteStore(std::make_unique<SpriteStore>(data.pixelRatio)), spriteAtlas(std::make_unique<SpriteAtlas>(512, 512, data.pixelRatio, *spriteStore)), lineAtlas(std::make_unique<LineAtlas>(512, 512)), - mtx(std::make_unique<uv::rwlock>()), workers(4) { glyphStore->setObserver(this); spriteStore->setObserver(this); @@ -139,7 +138,7 @@ void Style::cascade() { } void Style::recalculate(float z) { - uv::writelock lock(mtx); + std::lock_guard<std::mutex> lock(mtx); for (const auto& source : sources) { source->enabled = false; diff --git a/src/mbgl/style/style.hpp b/src/mbgl/style/style.hpp index dbaf8cf02c..e1113b3cd6 100644 --- a/src/mbgl/style/style.hpp +++ b/src/mbgl/style/style.hpp @@ -13,6 +13,7 @@ #include <mbgl/util/worker.hpp> #include <cstdint> +#include <mutex> #include <string> #include <vector> @@ -106,7 +107,7 @@ private: std::exception_ptr lastError; - std::unique_ptr<uv::rwlock> mtx; + std::mutex mtx; ZoomHistory zoomHistory; bool hasPendingTransitions = false; |