diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-04 12:26:21 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-07 11:19:08 -0800 |
commit | 203b443d2699c44115ce3f2b7234185e592ad529 (patch) | |
tree | 59749932ef82c78aa1bfa898eb5c9b36463f9965 /src/mbgl/util | |
parent | cdd129335cc7a58ef57b2258b4cde5b56ce414a6 (diff) | |
download | qtlocation-mapboxgl-203b443d2699c44115ce3f2b7234185e592ad529.tar.gz |
[core] Avoid making a new copy of layers for redoPlacement
Diffstat (limited to 'src/mbgl/util')
-rw-r--r-- | src/mbgl/util/worker.cpp | 6 | ||||
-rw-r--r-- | src/mbgl/util/worker.hpp | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/mbgl/util/worker.cpp b/src/mbgl/util/worker.cpp index 054f1df242..34f18dd3f4 100644 --- a/src/mbgl/util/worker.cpp +++ b/src/mbgl/util/worker.cpp @@ -55,11 +55,10 @@ public: } void redoPlacement(TileWorker* worker, - std::vector<std::unique_ptr<StyleLayer>> layers, const std::unordered_map<std::string, std::unique_ptr<Bucket>>* buckets, PlacementConfig config, std::function<void()> callback) { - worker->redoPlacement(std::move(layers), buckets, config); + worker->redoPlacement(buckets, config); callback(); } }; @@ -103,13 +102,12 @@ Worker::parsePendingGeometryTileLayers(TileWorker& worker, std::unique_ptr<WorkRequest> Worker::redoPlacement(TileWorker& worker, - std::vector<std::unique_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, - std::move(layers), &buckets, config); + &buckets, config); } } // end namespace mbgl diff --git a/src/mbgl/util/worker.hpp b/src/mbgl/util/worker.hpp index 31e45f1240..5ba477491d 100644 --- a/src/mbgl/util/worker.hpp +++ b/src/mbgl/util/worker.hpp @@ -49,7 +49,6 @@ public: std::function<void(TileParseResult)> callback); Request redoPlacement(TileWorker&, - std::vector<std::unique_ptr<StyleLayer>>, const std::unordered_map<std::string, std::unique_ptr<Bucket>>&, PlacementConfig config, std::function<void()> callback); |