From 9af70cb127d190a9b8257942c6080c8a1b440004 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Thu, 14 Feb 2019 16:56:17 +0200 Subject: [core] Make the BackgroundScheduler a singleton - Do not carry it over everywhere as parameter, it is a shared instance anyway and the lifecycle is pretty much the app lifecycle from the moment we instantiate a map. - Rename to BackgroundScheduler because it is a Scheduler that will do tasks in the background, we don't make assumptions if it is a thread pool or a single thread. - Most importantly, remove the dependency from `core` on `platform`. --- src/mbgl/style/sources/custom_geometry_source.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mbgl/style/sources/custom_geometry_source.cpp') diff --git a/src/mbgl/style/sources/custom_geometry_source.cpp b/src/mbgl/style/sources/custom_geometry_source.cpp index 6ce7c1be11..6e9d8d65fb 100644 --- a/src/mbgl/style/sources/custom_geometry_source.cpp +++ b/src/mbgl/style/sources/custom_geometry_source.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include @@ -14,7 +13,7 @@ namespace style { CustomGeometrySource::CustomGeometrySource(std::string id, const CustomGeometrySource::Options options) : Source(makeMutable(std::move(id), options)), - loader(std::make_unique>(*sharedThreadPool(), options.fetchTileFunction, options.cancelTileFunction)) { + loader(std::make_unique>(Scheduler::GetBackground(), options.fetchTileFunction, options.cancelTileFunction)) { } CustomGeometrySource::~CustomGeometrySource() = default; -- cgit v1.2.1