[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

@@ -1,6 +1,7 @@
#include <mbgl/test/util.hpp>
#include <mbgl/test/stub_file_source.hpp>
#include <mbgl/platform/default/thread_pool.hpp>
#include <mbgl/annotation/annotation.hpp>
#include <mbgl/sprite/sprite_image.hpp>
#include <mbgl/map/map.hpp>
@@ -25,7 +26,8 @@ public:
std::shared_ptr<HeadlessDisplay> display { std::make_shared<HeadlessDisplay>() };
HeadlessView view { display, 1 };
StubFileSource fileSource;
Map map { view, fileSource, MapMode::Still };
ThreadPool threadPool { 4 };
Map map { view, fileSource, threadPool, MapMode::Still };
void checkRendering(const char * name) {
test::checkImage(std::string("test/fixtures/annotations/") + name,