[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:
37
src/mbgl/tile/tile.cpp
Normal file
37
src/mbgl/tile/tile.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include <mbgl/tile/tile.hpp>
|
||||
#include <mbgl/tile/tile_observer.hpp>
|
||||
#include <mbgl/renderer/debug_bucket.hpp>
|
||||
#include <mbgl/util/string.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
static TileObserver nullObserver;
|
||||
|
||||
Tile::Tile(const OverscaledTileID& id_)
|
||||
: id(id_), observer(&nullObserver) {
|
||||
}
|
||||
|
||||
Tile::~Tile() = default;
|
||||
|
||||
void Tile::setObserver(TileObserver* observer_) {
|
||||
observer = observer_;
|
||||
}
|
||||
|
||||
void Tile::setTriedOptional() {
|
||||
triedOptional = true;
|
||||
observer->onNeedsRepaint();
|
||||
}
|
||||
|
||||
void Tile::dumpDebugLogs() const {
|
||||
Log::Info(Event::General, "Tile::id: %s", util::toString(id).c_str());
|
||||
Log::Info(Event::General, "Tile::renderable: %s", isRenderable() ? "yes" : "no");
|
||||
Log::Info(Event::General, "Tile::complete: %s", isComplete() ? "yes" : "no");
|
||||
}
|
||||
|
||||
void Tile::queryRenderedFeatures(
|
||||
std::unordered_map<std::string, std::vector<Feature>>&,
|
||||
const GeometryCoordinates&,
|
||||
const TransformState&,
|
||||
const optional<std::vector<std::string>>&) {}
|
||||
|
||||
} // namespace mbgl
|
||||
Reference in New Issue
Block a user