summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-06-04 13:46:21 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-06-04 14:09:05 -0700
commita0503f3f5b1e480df639e4f21d49e519bb721c4b (patch)
treee06287c76bf0998797ddfa79b16436fd593190d0 /src
parent409cd1651f0445bde009fc0561b684777163e508 (diff)
downloadqtlocation-mapboxgl-a0503f3f5b1e480df639e4f21d49e519bb721c4b.tar.gz
Remove unused overscaling variables
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/live_tile_data.cpp3
-rw-r--r--src/mbgl/map/live_tile_data.hpp1
-rw-r--r--src/mbgl/map/source.cpp5
-rw-r--r--src/mbgl/map/vector_tile_data.cpp2
-rw-r--r--src/mbgl/map/vector_tile_data.hpp2
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 1d8c42e1e4..4935c01345 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> 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 4dfe832f64..1620671230 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<Sprite>,
const SourceInfo&,
- float overscaling_,
float angle_,
bool collisionDebug_);
~LiveTileData();
diff --git a/src/mbgl/map/source.cpp b/src/mbgl/map/source.cpp
index ae39b84ee3..97adacad6d 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<Tile>(id));
Tile& new_tile = *pos.first->second;
@@ -297,7 +296,7 @@ TileData::State Source::addTile(MapData& data,
new_tile.data =
std::make_shared<VectorTileData>(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<RasterTileData>(normalized_id, texturePool, info);
@@ -307,7 +306,7 @@ TileData::State Source::addTile(MapData& data,
new_tile.data = std::make_shared<LiveTileData>(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 d431a200e6..6dc6e8e9b3 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> 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<CollisionTile>(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 2c7c3a204a..5a6f448c69 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<Sprite>,
const SourceInfo&,
- float overscaling_,
float angle_,
bool collisionDebug_);
~VectorTileData();
@@ -83,7 +82,6 @@ private:
std::unordered_map<std::string, std::unique_ptr<Bucket>> buckets;
mutable std::mutex bucketsMutex;
- const float overscaling;
std::unique_ptr<CollisionTile> collision;
float lastAngle = 0;