summaryrefslogtreecommitdiff
path: root/src/mbgl/tile/raster_tile.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-09-06 15:01:34 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-09-16 12:01:06 -0700
commit41bbd4e4f7d66465433e370ca024ab0239fcace3 (patch)
tree8fe15fa31d97aafeb175a808e431b437297af88b /src/mbgl/tile/raster_tile.hpp
parent0bd66d40ddf9e75f860fe18e7c80de9c840f48ac (diff)
downloadqtlocation-mapboxgl-41bbd4e4f7d66465433e370ca024ab0239fcace3.tar.gz
[core] Use an actor model for tile worker concurrency
Diffstat (limited to 'src/mbgl/tile/raster_tile.hpp')
-rw-r--r--src/mbgl/tile/raster_tile.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mbgl/tile/raster_tile.hpp b/src/mbgl/tile/raster_tile.hpp
index 496edda6b3..2b2e84d463 100644
--- a/src/mbgl/tile/raster_tile.hpp
+++ b/src/mbgl/tile/raster_tile.hpp
@@ -2,11 +2,11 @@
#include <mbgl/tile/tile.hpp>
#include <mbgl/tile/tile_loader.hpp>
-#include <mbgl/renderer/raster_bucket.hpp>
+#include <mbgl/tile/raster_tile_worker.hpp>
+#include <mbgl/actor/actor.hpp>
namespace mbgl {
-class AsyncRequest;
class Tileset;
namespace style {
@@ -32,11 +32,13 @@ public:
void cancel() override;
Bucket* getBucket(const style::Layer&) override;
-private:
- Worker& worker;
+ void onParsed(std::unique_ptr<Bucket> result);
+private:
TileLoader<RasterTile> loader;
- std::unique_ptr<AsyncRequest> workRequest;
+
+ std::shared_ptr<Mailbox> mailbox;
+ Actor<RasterTileWorker> worker;
// Contains the Bucket object for the tile. Buckets are render
// objects and they get added by tile parsing operations.