[core] Do not use uv::rwlock on Style
It was being used as a normal mutex anyway.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user