From bb7c453b3e29de4a854560dfca34a89fc832a39d Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 23 Apr 2015 15:31:56 -0700 Subject: [PATCH] Inline getWorker() --- src/mbgl/map/map_context.cpp | 7 +------ src/mbgl/map/map_context.hpp | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index b4b2a3f55..fa99dec7e 100644 --- a/src/mbgl/map/map_context.cpp +++ b/src/mbgl/map/map_context.cpp @@ -122,11 +122,6 @@ void MapContext::setStyleJSON(const std::string& json, const std::string& base) loadStyleJSON(json, base); } -Worker& MapContext::getWorker() { - assert(workers); - return *workers; -} - util::ptr MapContext::getSprite() { assert(Environment::currentlyOn(ThreadType::Map)); const float pixelRatio = transformState.getPixelRatio(); @@ -168,7 +163,7 @@ void MapContext::updateTiles() { assert(Environment::currentlyOn(ThreadType::Map)); if (!style) return; for (const auto& source : style->sources) { - source->update(data, transformState, getWorker(), style, *glyphAtlas, *glyphStore, *spriteAtlas, + source->update(data, transformState, *workers, style, *glyphAtlas, *glyphStore, *spriteAtlas, getSprite(), *texturePool, [this]() { assert(Environment::currentlyOn(ThreadType::Map)); triggerUpdate(); diff --git a/src/mbgl/map/map_context.hpp b/src/mbgl/map/map_context.hpp index e31b6f483..b3a9b9f33 100644 --- a/src/mbgl/map/map_context.hpp +++ b/src/mbgl/map/map_context.hpp @@ -63,7 +63,6 @@ public: void onLowMemory(); private: - Worker& getWorker(); util::ptr getSprite(); void updateTiles();