[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
This commit is contained in:
Mike Morris
2016-10-12 17:28:22 -04:00
parent ab85fdb452
commit 817c26111a
41 changed files with 211 additions and 66 deletions

View File

@@ -3,8 +3,9 @@
#include <mbgl/util/io.hpp>
#include <mbgl/util/run_loop.hpp>
#include <mbgl/platform/default/headless_view.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>
#pragma GCC diagnostic push
@@ -84,7 +85,8 @@ int main(int argc, char *argv[]) {
}
HeadlessView view(pixelRatio, width, height);
Map map(view, fileSource, MapMode::Still);
ThreadPool threadPool(4);
Map map(view, fileSource, threadPool, MapMode::Still);
map.setStyleJSON(style);
map.setClasses(classes);