[core] restructure TileSource construction and callbacks
This commit is contained in:
@@ -17,12 +17,16 @@ class Layer;
|
||||
class RasterTileData : public TileData {
|
||||
public:
|
||||
RasterTileData(const OverscaledTileID&,
|
||||
std::unique_ptr<RasterTileSource>,
|
||||
gl::TexturePool&,
|
||||
Worker&,
|
||||
const std::function<void(std::exception_ptr)>& callback);
|
||||
~RasterTileData();
|
||||
|
||||
void setData(std::exception_ptr err,
|
||||
std::shared_ptr<const std::string> data,
|
||||
optional<Timestamp> modified_,
|
||||
optional<Timestamp> expires_);
|
||||
|
||||
void cancel() override;
|
||||
Bucket* getBucket(const style::Layer&) override;
|
||||
|
||||
@@ -30,12 +34,13 @@ private:
|
||||
gl::TexturePool& texturePool;
|
||||
Worker& worker;
|
||||
|
||||
std::unique_ptr<AsyncRequest> tileRequest;
|
||||
std::unique_ptr<AsyncRequest> workRequest;
|
||||
|
||||
// Contains the Bucket object for the tile. Buckets are render
|
||||
// objects and they get added by tile parsing operations.
|
||||
std::unique_ptr<Bucket> bucket;
|
||||
|
||||
const std::function<void(std::exception_ptr)> callback;
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user