[core] Move Sprite parsing to thread pool

This commit is contained in:
Konstantin Käfer
2017-04-20 12:28:35 +02:00
parent 197f0ca6b4
commit 59055cf403
20 changed files with 147 additions and 77 deletions

View File

@@ -359,7 +359,7 @@ void Map::setStyleURL(const std::string& url) {
impl->styleJSON.clear();
impl->styleMutated = false;
impl->style = std::make_unique<Style>(impl->fileSource, impl->pixelRatio);
impl->style = std::make_unique<Style>(impl->scheduler, impl->fileSource, impl->pixelRatio);
impl->styleRequest = impl->fileSource.request(Resource::style(impl->styleURL), [this](Response res) {
// Once we get a fresh style, or the style is mutated, stop revalidating.
@@ -405,7 +405,7 @@ void Map::setStyleJSON(const std::string& json) {
impl->styleJSON.clear();
impl->styleMutated = false;
impl->style = std::make_unique<Style>(impl->fileSource, impl->pixelRatio);
impl->style = std::make_unique<Style>(impl->scheduler, impl->fileSource, impl->pixelRatio);
impl->loadStyleJSON(json);
}