summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-04-03 17:13:59 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-04-06 10:30:02 -0700
commit15969f1369531fe1dd0ef29e058785f18c71258c (patch)
tree9ef752465c981b190d86dcb06f083847911f35a9 /src
parent750cfb6f581918512ea8ed87e3f93afbcfee5f60 (diff)
downloadqtlocation-mapboxgl-15969f1369531fe1dd0ef29e058785f18c71258c.tar.gz
Remove Map dependency from Source::invalidateTiles
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map.cpp4
-rw-r--r--src/mbgl/map/source.cpp3
-rw-r--r--src/mbgl/map/source.hpp2
3 files changed, 4 insertions, 5 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 5d8bf45473..333be1e030 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -621,10 +621,10 @@ void Map::updateAnnotationTiles(const std::vector<Tile::ID>& ids) {
if (!style) return;
for (const auto &source : style->sources) {
if (source->info.type == SourceType::Annotations) {
- source->invalidateTiles(*this, ids);
- return;
+ source->invalidateTiles(ids);
}
}
+ triggerUpdate();
}
#pragma mark - Toggles
diff --git a/src/mbgl/map/source.cpp b/src/mbgl/map/source.cpp
index 4db7f466a3..4697d70181 100644
--- a/src/mbgl/map/source.cpp
+++ b/src/mbgl/map/source.cpp
@@ -427,12 +427,11 @@ void Source::update(Map &map,
updated = map.getTime();
}
-void Source::invalidateTiles(Map& map, const std::vector<Tile::ID>& ids) {
+void Source::invalidateTiles(const std::vector<Tile::ID>& ids) {
for (auto& id : ids) {
tiles.erase(id);
tile_data.erase(id);
}
- map.triggerUpdate();
}
}
diff --git a/src/mbgl/map/source.hpp b/src/mbgl/map/source.hpp
index 636b463005..9c59acfc47 100644
--- a/src/mbgl/map/source.hpp
+++ b/src/mbgl/map/source.hpp
@@ -58,7 +58,7 @@ public:
void update(Map &, uv::worker &, util::ptr<Style>, GlyphAtlas &, GlyphStore &,
SpriteAtlas &, util::ptr<Sprite>, TexturePool &, std::function<void()> callback);
- void invalidateTiles(Map&, const std::vector<Tile::ID>&);
+ void invalidateTiles(const std::vector<Tile::ID>&);
void updateMatrices(const mat4 &projMatrix, const TransformState &transform);
void drawClippingMasks(Painter &painter);