summaryrefslogtreecommitdiff
path: root/platform/android/src/native_map_view.cpp
diff options
context:
space:
mode:
authorMike Morris <mikemorris@users.noreply.github.com>2016-10-12 17:28:22 -0400
committerMike Morris <mikemorris@users.noreply.github.com>2016-10-20 14:37:36 -0400
commit817c26111a0d6650e7ebae73e46621626106d0a7 (patch)
tree60a5206f2f7658b06b214d9b7435a65a243d6e83 /platform/android/src/native_map_view.cpp
parentab85fdb4524788ce7279e8ac362a0c1edbd5d5df (diff)
downloadqtlocation-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 'platform/android/src/native_map_view.cpp')
-rwxr-xr-xplatform/android/src/native_map_view.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp
index 2714b832e3..5bd2694932 100755
--- a/platform/android/src/native_map_view.cpp
+++ b/platform/android/src/native_map_view.cpp
@@ -60,7 +60,8 @@ NativeMapView::NativeMapView(JNIEnv *env_, jobject obj_, float pixelRatio_, int
env(env_),
pixelRatio(pixelRatio_),
availableProcessors(availableProcessors_),
- totalMemory(totalMemory_) {
+ totalMemory(totalMemory_),
+ threadPool(4) {
mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::NativeMapView");
assert(env_ != nullptr);
@@ -81,7 +82,7 @@ NativeMapView::NativeMapView(JNIEnv *env_, jobject obj_, float pixelRatio_, int
mbgl::android::cachePath + "/mbgl-offline.db",
mbgl::android::apkPath);
- map = std::make_unique<mbgl::Map>(*this, *fileSource, MapMode::Continuous);
+ map = std::make_unique<mbgl::Map>(*this, *fileSource, threadPool, MapMode::Continuous);
float zoomFactor = map->getMaxZoom() - map->getMinZoom() + 1;
float cpuFactor = availableProcessors;