diff options
author | Mike Morris <mikemorris@users.noreply.github.com> | 2016-10-12 17:28:22 -0400 |
---|---|---|
committer | Mike Morris <mikemorris@users.noreply.github.com> | 2016-10-20 14:37:36 -0400 |
commit | 817c26111a0d6650e7ebae73e46621626106d0a7 (patch) | |
tree | 60a5206f2f7658b06b214d9b7435a65a243d6e83 /test/api/custom_layer.test.cpp | |
parent | ab85fdb4524788ce7279e8ac362a0c1edbd5d5df (diff) | |
download | qtlocation-mapboxgl-817c26111a0d6650e7ebae73e46621626106d0a7.tar.gz |
[core] [node] pass thread pool impl to Map constructor
Updates mbgl::Map constructor usage everywhere
Adds NodeThreadPool implementation using AsyncQueue to call
Nan::AsyncQueueWorker from main thread
Diffstat (limited to 'test/api/custom_layer.test.cpp')
-rw-r--r-- | test/api/custom_layer.test.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/api/custom_layer.test.cpp b/test/api/custom_layer.test.cpp index 2dded19256..1342dfa50c 100644 --- a/test/api/custom_layer.test.cpp +++ b/test/api/custom_layer.test.cpp @@ -4,6 +4,7 @@ #include <mbgl/map/map.hpp> #include <mbgl/platform/default/headless_display.hpp> #include <mbgl/platform/default/headless_view.hpp> +#include <mbgl/platform/default/thread_pool.hpp> #include <mbgl/storage/default_file_source.hpp> #include <mbgl/style/layers/custom_layer.hpp> #include <mbgl/style/layers/fill_layer.hpp> @@ -94,7 +95,9 @@ TEST(CustomLayer, Basic) { DefaultFileSource fileSource(":memory:", "test/fixtures/api/assets"); #endif - Map map(view, fileSource, MapMode::Still); + ThreadPool threadPool(4); + + Map map(view, fileSource, threadPool, MapMode::Still); map.setStyleJSON(util::read_file("test/fixtures/api/water.json")); map.setLatLngZoom({ 37.8, -122.5 }, 10); map.addLayer(std::make_unique<CustomLayer>( |