summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-06-24 18:44:30 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-06-26 10:32:07 -0700
commit874aa69efbb3131693752cf8ec5bd802bf0ac0a1 (patch)
tree60baefd6051c62b97f573b4a64dd17861944fab0 /src
parentdca42018d26aaab2148db0b8f2971821ebc3a4cf (diff)
downloadqtlocation-mapboxgl-874aa69efbb3131693752cf8ec5bd802bf0ac0a1.tar.gz
Inline updateTiles and recalculateStyle
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map_context.cpp14
-rw-r--r--src/mbgl/map/map_context.hpp2
2 files changed, 2 insertions, 14 deletions
diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp
index 3ac05c8e4c..97cc8de48b 100644
--- a/src/mbgl/map/map_context.cpp
+++ b/src/mbgl/map/map_context.cpp
@@ -127,12 +127,6 @@ void MapContext::loadStyleJSON(const std::string& json, const std::string& base)
}
}
-void MapContext::updateTiles() {
- assert(util::ThreadContext::currentlyOn(util::ThreadType::Map));
-
- style->update(data, transformState, *texturePool);
-}
-
void MapContext::updateAnnotationTiles(const std::unordered_set<TileID, TileID::Hash>& ids) {
assert(util::ThreadContext::currentlyOn(util::ThreadType::Map));
@@ -230,10 +224,6 @@ void MapContext::cascadeClasses() {
style->cascade(data.getClasses());
}
-void MapContext::recalculateStyle(TimePoint now) {
- style->recalculate(transformState.getNormalizedZoom(), now);
-}
-
void MapContext::update() {
assert(util::ThreadContext::currentlyOn(util::ThreadType::Map));
@@ -254,10 +244,10 @@ void MapContext::update() {
if (updated & static_cast<UpdateType>(Update::Classes) ||
updated & static_cast<UpdateType>(Update::Zoom)) {
- recalculateStyle(now);
+ style->recalculate(transformState.getNormalizedZoom(), now);
}
- updateTiles();
+ style->update(data, transformState, *texturePool);
if (style->isLoaded()) {
if (!data.getFullyLoaded()) {
diff --git a/src/mbgl/map/map_context.hpp b/src/mbgl/map/map_context.hpp
index 89b1b28a95..810219e6b0 100644
--- a/src/mbgl/map/map_context.hpp
+++ b/src/mbgl/map/map_context.hpp
@@ -61,12 +61,10 @@ public:
void onResourceLoadingFailed(std::exception_ptr error) override;
private:
- void updateTiles();
void render();
// Style-related updates.
void cascadeClasses();
- void recalculateStyle(TimePoint);
// Update the state indicated by the accumulated Update flags, then render.
void update();