diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index 3ac05c8e4..97cc8de48 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& 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(Update::Classes) || updated & static_cast(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 89b1b28a9..810219e6b 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();