[core] move TileData and dependents to new *TileID classes

This commit is contained in:
Konstantin Käfer
2016-05-10 11:47:54 +02:00
parent bdcbceff80
commit ec70125e41
43 changed files with 181 additions and 155 deletions

View File

@@ -11,12 +11,13 @@
#include <mbgl/renderer/symbol_bucket.hpp>
#include <mbgl/platform/log.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/string.hpp>
#include <mbgl/util/exception.hpp>
#include <utility>
using namespace mbgl;
TileWorker::TileWorker(TileID id_,
TileWorker::TileWorker(const OverscaledTileID& id_,
std::string sourceID_,
SpriteStore& spriteStore_,
GlyphAtlas& glyphAtlas_,
@@ -139,8 +140,8 @@ void TileWorker::parseLayer(const StyleLayer* layer) {
// Skip this bucket if we are to not render this
if ((layer->source != sourceID) ||
(id.z < std::floor(layer->minZoom)) ||
(id.z >= std::ceil(layer->maxZoom)) ||
(id.overscaledZ < std::floor(layer->minZoom)) ||
(id.overscaledZ >= std::ceil(layer->maxZoom)) ||
(layer->visibility == VisibilityType::None)) {
return;
}
@@ -149,8 +150,8 @@ void TileWorker::parseLayer(const StyleLayer* layer) {
if (!geometryLayer) {
// The layer specified in the bucket does not exist. Do nothing.
if (debug::tileParseWarnings) {
Log::Warning(Event::ParseTile, "layer '%s' does not exist in tile %d/%d/%d",
layer->sourceLayer.c_str(), id.z, id.x, id.y);
Log::Warning(Event::ParseTile, "layer '%s' does not exist in tile %s",
layer->sourceLayer.c_str(), util::toString(id).c_str());
}
return;
}