diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-04-20 12:28:35 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-04-24 10:42:47 +0200 |
commit | 59055cf403cab60496fcc8e7cbf06874fa55bb8b (patch) | |
tree | 7e74c6ba3fa9c2cc1930811302e8b93b48ab1687 /src/mbgl/style/style.cpp | |
parent | 197f0ca6b418a27412bfcc7e891ab80949fd8833 (diff) | |
download | qtlocation-mapboxgl-59055cf403cab60496fcc8e7cbf06874fa55bb8b.tar.gz |
[core] Move Sprite parsing to thread pool
Diffstat (limited to 'src/mbgl/style/style.cpp')
-rw-r--r-- | src/mbgl/style/style.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp index 1e18709391..fc1770e9ee 100644 --- a/src/mbgl/style/style.cpp +++ b/src/mbgl/style/style.cpp @@ -40,8 +40,9 @@ namespace style { static Observer nullObserver; -Style::Style(FileSource& fileSource_, float pixelRatio) - : fileSource(fileSource_), +Style::Style(Scheduler& scheduler_, FileSource& fileSource_, float pixelRatio) + : scheduler(scheduler_), + fileSource(fileSource_), glyphAtlas(std::make_unique<GlyphAtlas>(Size{ 2048, 2048 }, fileSource)), spriteAtlas(std::make_unique<SpriteAtlas>(Size{ 1024, 1024 }, pixelRatio)), lineAtlas(std::make_unique<LineAtlas>(Size{ 256, 512 })), @@ -133,7 +134,7 @@ void Style::setJSON(const std::string& json) { defaultPitch = parser.pitch; glyphAtlas->setURL(parser.glyphURL); - spriteAtlas->load(parser.spriteURL, fileSource); + spriteAtlas->load(parser.spriteURL, scheduler, fileSource); loaded = true; |