diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-02-14 16:56:17 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-05-10 11:26:44 +0300 |
commit | ea8943ebb272a8f0a767f2b76a6f9cbaab474727 (patch) | |
tree | 0e83ae8270e90e3f823153ead0e3535f0682b84f /src/mbgl/tile/geometry_tile.cpp | |
parent | 9fb41a74bcfefefbf79a9bf4090c0e4e90c0e08a (diff) | |
download | qtlocation-mapboxgl-ea8943ebb272a8f0a767f2b76a6f9cbaab474727.tar.gz |
[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`.
Diffstat (limited to 'src/mbgl/tile/geometry_tile.cpp')
-rw-r--r-- | src/mbgl/tile/geometry_tile.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/tile/geometry_tile.cpp b/src/mbgl/tile/geometry_tile.cpp index 029c761e53..d110b2f826 100644 --- a/src/mbgl/tile/geometry_tile.cpp +++ b/src/mbgl/tile/geometry_tile.cpp @@ -1,4 +1,5 @@ #include <mbgl/tile/geometry_tile.hpp> + #include <mbgl/tile/geometry_tile_worker.hpp> #include <mbgl/tile/geometry_tile_data.hpp> #include <mbgl/tile/tile_observer.hpp> @@ -45,7 +46,7 @@ GeometryTile::GeometryTile(const OverscaledTileID& id_, ImageRequestor(parameters.imageManager), sourceID(std::move(sourceID_)), mailbox(std::make_shared<Mailbox>(*Scheduler::GetCurrent())), - worker(parameters.workerScheduler, + worker(Scheduler::GetBackground(), ActorRef<GeometryTile>(*this, mailbox), id_, sourceID, |