[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.
This commit is contained in:
48
src/mbgl/tile/raster_tile.hpp
Normal file
48
src/mbgl/tile/raster_tile.hpp
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user