diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-13 10:59:33 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-13 10:59:33 -0700 |
commit | 5c7dfd948ffd52f2b60dcfe052176da788f17893 (patch) | |
tree | 596d02b0e28d6e7649f9527af2834c90c3c3b056 /src/mbgl/tile/raster_tile.hpp | |
parent | 3ab7c1cca3aa4658b40af1d7d591850e005d011e (diff) | |
download | qtlocation-mapboxgl-5c7dfd948ffd52f2b60dcfe052176da788f17893.tar.gz |
[core] *Tile ↔ *TileData
Tile is now the main base class; RasterTile, VectorTile, etc are its subclasses. GeometryTileData and its subclasses form the piece that's passed to the worker.
Diffstat (limited to 'src/mbgl/tile/raster_tile.hpp')
-rw-r--r-- | src/mbgl/tile/raster_tile.hpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/mbgl/tile/raster_tile.hpp b/src/mbgl/tile/raster_tile.hpp new file mode 100644 index 0000000000..eebfbe6b9c --- /dev/null +++ b/src/mbgl/tile/raster_tile.hpp @@ -0,0 +1,48 @@ +#pragma once + +#include <mbgl/tile/tile.hpp> +#include <mbgl/tile/tile_source.hpp> +#include <mbgl/renderer/raster_bucket.hpp> + +namespace mbgl { + +class AsyncRequest; +class Tileset; + +namespace gl { class TexturePool; } + +namespace style { +class Layer; +class UpdateParameters; +} + +class RasterTile : public Tile { +public: + RasterTile(const OverscaledTileID&, + const style::UpdateParameters&, + const Tileset&); + + void setNecessity(Necessity) final; + + void setError(std::exception_ptr err); + + void setData(std::shared_ptr<const std::string> data, + optional<Timestamp> modified_, + optional<Timestamp> expires_); + + void cancel() override; + Bucket* getBucket(const style::Layer&) override; + +private: + gl::TexturePool& texturePool; + Worker& worker; + + TileSource<RasterTile> tileSource; + 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; +}; + +} // namespace mbgl |