From a0503f3f5b1e480df639e4f21d49e519bb721c4b Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 4 Jun 2015 13:46:21 -0700 Subject: [PATCH] Remove unused overscaling variables --- src/mbgl/map/live_tile_data.cpp | 3 +-- src/mbgl/map/live_tile_data.hpp | 1 - src/mbgl/map/source.cpp | 5 ++--- src/mbgl/map/vector_tile_data.cpp | 2 -- src/mbgl/map/vector_tile_data.hpp | 2 -- 5 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/mbgl/map/live_tile_data.cpp b/src/mbgl/map/live_tile_data.cpp index 1d8c42e1e..4935c0134 100644 --- a/src/mbgl/map/live_tile_data.cpp +++ b/src/mbgl/map/live_tile_data.cpp @@ -16,11 +16,10 @@ LiveTileData::LiveTileData(const TileID& id_, SpriteAtlas& spriteAtlas_, util::ptr sprite_, const SourceInfo& source_, - float overscaling_, float angle_, bool collisionDebug_) : VectorTileData::VectorTileData(id_, style_, glyphAtlas_, glyphStore_, - spriteAtlas_, sprite_, source_, overscaling_, angle_, collisionDebug_), + spriteAtlas_, sprite_, source_, angle_, collisionDebug_), annotationManager(annotationManager_) { // live features are always ready setState(State::loaded); diff --git a/src/mbgl/map/live_tile_data.hpp b/src/mbgl/map/live_tile_data.hpp index 4dfe832f6..162067123 100644 --- a/src/mbgl/map/live_tile_data.hpp +++ b/src/mbgl/map/live_tile_data.hpp @@ -17,7 +17,6 @@ public: SpriteAtlas&, util::ptr, const SourceInfo&, - float overscaling_, float angle_, bool collisionDebug_); ~LiveTileData(); diff --git a/src/mbgl/map/source.cpp b/src/mbgl/map/source.cpp index ae39b84ee..97adacad6 100644 --- a/src/mbgl/map/source.cpp +++ b/src/mbgl/map/source.cpp @@ -265,7 +265,6 @@ TileData::State Source::addTile(MapData& data, return state; } - const float overscaling = id.z > info.max_zoom ? std::pow(2.0f, id.z - info.max_zoom) : 1.0f; auto pos = tiles.emplace(id, std::make_unique(id)); Tile& new_tile = *pos.first->second; @@ -297,7 +296,7 @@ TileData::State Source::addTile(MapData& data, new_tile.data = std::make_shared(normalized_id, style, glyphAtlas, glyphStore, spriteAtlas, sprite, info, - overscaling, transformState.getAngle(), data.getCollisionDebug()); + transformState.getAngle(), data.getCollisionDebug()); new_tile.data->request(style.workers, transformState.getPixelRatio(), callback); } else if (info.type == SourceType::Raster) { new_tile.data = std::make_shared(normalized_id, texturePool, info); @@ -307,7 +306,7 @@ TileData::State Source::addTile(MapData& data, new_tile.data = std::make_shared(normalized_id, data.annotationManager, style, glyphAtlas, glyphStore, spriteAtlas, sprite, info, - overscaling, transformState.getAngle(), data.getCollisionDebug()); + transformState.getAngle(), data.getCollisionDebug()); new_tile.data->reparse(style.workers, callback); } else { throw std::runtime_error("source type not implemented"); diff --git a/src/mbgl/map/vector_tile_data.cpp b/src/mbgl/map/vector_tile_data.cpp index d431a200e..6dc6e8e9b 100644 --- a/src/mbgl/map/vector_tile_data.cpp +++ b/src/mbgl/map/vector_tile_data.cpp @@ -20,7 +20,6 @@ VectorTileData::VectorTileData(const TileID& id_, SpriteAtlas& spriteAtlas_, util::ptr sprite_, const SourceInfo& source_, - float overscaling_, float angle, bool collisionDebug) : TileData(id_, source_), @@ -29,7 +28,6 @@ VectorTileData::VectorTileData(const TileID& id_, spriteAtlas(spriteAtlas_), sprite(sprite_), style(style_), - overscaling(overscaling_), collision(std::make_unique(id_.z, 4096, source_.tile_size * id.overscaling, angle, collisionDebug)), lastAngle(angle), currentAngle(angle) { diff --git a/src/mbgl/map/vector_tile_data.hpp b/src/mbgl/map/vector_tile_data.hpp index 2c7c3a204..5a6f448c6 100644 --- a/src/mbgl/map/vector_tile_data.hpp +++ b/src/mbgl/map/vector_tile_data.hpp @@ -39,7 +39,6 @@ public: SpriteAtlas&, util::ptr, const SourceInfo&, - float overscaling_, float angle_, bool collisionDebug_); ~VectorTileData(); @@ -83,7 +82,6 @@ private: std::unordered_map> buckets; mutable std::mutex bucketsMutex; - const float overscaling; std::unique_ptr collision; float lastAngle = 0;