summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-04-20 12:28:35 +0200
committerKonstantin Käfer <mail@kkaefer.com>2017-04-24 10:42:47 +0200
commit59055cf403cab60496fcc8e7cbf06874fa55bb8b (patch)
tree7e74c6ba3fa9c2cc1930811302e8b93b48ab1687 /src/mbgl/annotation
parent197f0ca6b418a27412bfcc7e891ab80949fd8833 (diff)
downloadqtlocation-mapboxgl-59055cf403cab60496fcc8e7cbf06874fa55bb8b.tar.gz
[core] Move Sprite parsing to thread pool
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r--src/mbgl/annotation/annotation_manager.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp
index 537ac70156..f2b2b1837f 100644
--- a/src/mbgl/annotation/annotation_manager.cpp
+++ b/src/mbgl/annotation/annotation_manager.cpp
@@ -21,19 +21,9 @@ const std::string AnnotationManager::PointLayerID = "com.mapbox.annotations.poin
AnnotationManager::AnnotationManager(float pixelRatio)
: spriteAtlas({ 1024, 1024 }, pixelRatio) {
-
- struct NullFileSource : public FileSource {
- std::unique_ptr<AsyncRequest> request(const Resource&, Callback) override {
- assert(false);
- return nullptr;
- }
- };
-
- NullFileSource nullFileSource;
-
- // This is a special atlas, holding only images added via addIcon. But we need its isLoaded()
- // method to return true.
- spriteAtlas.load("", nullFileSource);
+ // This is a special atlas, holding only images added via addIcon, so we always treat it as
+ // loaded.
+ spriteAtlas.markAsLoaded();
}
AnnotationManager::~AnnotationManager() = default;