summaryrefslogtreecommitdiff
path: root/src/mbgl/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/util')
-rw-r--r--src/mbgl/util/worker.cpp12
-rw-r--r--src/mbgl/util/worker.hpp2
2 files changed, 10 insertions, 4 deletions
diff --git a/src/mbgl/util/worker.cpp b/src/mbgl/util/worker.cpp
index b0005eda6f..9940fb649c 100644
--- a/src/mbgl/util/worker.cpp
+++ b/src/mbgl/util/worker.cpp
@@ -30,11 +30,12 @@ public:
}
void parseGeometryTile(TileWorker* worker,
+ std::vector<util::ptr<StyleLayer>> layers,
std::unique_ptr<GeometryTile> tile,
PlacementConfig config,
std::function<void(TileParseResult)> callback) {
try {
- callback(worker->parseAllLayers(*tile, config));
+ callback(worker->parseAllLayers(layers, *tile, config));
} catch (const std::exception& ex) {
callback(TileParseResult(ex.what()));
}
@@ -50,10 +51,11 @@ public:
}
void redoPlacement(TileWorker* worker,
+ std::vector<util::ptr<StyleLayer>> layers,
const std::unordered_map<std::string, std::unique_ptr<Bucket>>* buckets,
PlacementConfig config,
std::function<void()> callback) {
- worker->redoPlacement(buckets, config);
+ worker->redoPlacement(layers, buckets, config);
callback();
}
};
@@ -78,12 +80,13 @@ Worker::parseRasterTile(std::unique_ptr<RasterBucket> bucket,
std::unique_ptr<WorkRequest>
Worker::parseGeometryTile(TileWorker& worker,
+ std::vector<util::ptr<StyleLayer>> layers,
std::unique_ptr<GeometryTile> tile,
PlacementConfig config,
std::function<void(TileParseResult)> callback) {
current = (current + 1) % threads.size();
return threads[current]->invokeWithCallback(&Worker::Impl::parseGeometryTile, callback, &worker,
- std::move(tile), config);
+ std::move(layers), std::move(tile), config);
}
std::unique_ptr<WorkRequest>
@@ -96,12 +99,13 @@ Worker::parsePendingGeometryTileLayers(TileWorker& worker,
std::unique_ptr<WorkRequest>
Worker::redoPlacement(TileWorker& worker,
+ std::vector<util::ptr<StyleLayer>> layers,
const std::unordered_map<std::string, std::unique_ptr<Bucket>>& buckets,
PlacementConfig config,
std::function<void()> callback) {
current = (current + 1) % threads.size();
return threads[current]->invokeWithCallback(&Worker::Impl::redoPlacement, callback, &worker,
- &buckets, config);
+ layers, &buckets, config);
}
} // end namespace mbgl
diff --git a/src/mbgl/util/worker.hpp b/src/mbgl/util/worker.hpp
index e7bd3daada..f0f291e24c 100644
--- a/src/mbgl/util/worker.hpp
+++ b/src/mbgl/util/worker.hpp
@@ -40,6 +40,7 @@ public:
std::function<void(RasterTileParseResult)> callback);
Request parseGeometryTile(TileWorker&,
+ std::vector<util::ptr<StyleLayer>>,
std::unique_ptr<GeometryTile>,
PlacementConfig,
std::function<void(TileParseResult)> callback);
@@ -48,6 +49,7 @@ public:
std::function<void(TileParseResult)> callback);
Request redoPlacement(TileWorker&,
+ std::vector<util::ptr<StyleLayer>>,
const std::unordered_map<std::string, std::unique_ptr<Bucket>>&,
PlacementConfig config,
std::function<void()> callback);