#pragma once #include #include #include #include namespace mbgl { class Tileset; class TileParameters; class RasterBucket; namespace style { class Layer; } // namespace style class RasterTile : public Tile { public: RasterTile(const OverscaledTileID&, const TileParameters&, const Tileset&); ~RasterTile() final; void setNecessity(TileNecessity) final; void setError(std::exception_ptr); void setMetadata(optional modified, optional expires); void setData(std::shared_ptr data); void cancel() override; void upload(gl::Context&) override; Bucket* getBucket(const style::Layer::Impl&) const override; void setMask(TileMask&&) override; void onParsed(std::unique_ptr result, uint64_t correlationID); void onError(std::exception_ptr, uint64_t correlationID); private: TileLoader loader; std::shared_ptr mailbox; Actor worker; uint64_t correlationID = 0; // Contains the Bucket object for the tile. Buckets are render // objects and they get added by tile parsing operations. std::unique_ptr bucket; }; } // namespace mbgl