summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-02-11 01:54:05 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-02-11 14:34:46 +0200
commit64e2bcdf4395a1c65cd9faca81f98c4c5d974bd6 (patch)
tree672f0cb62600314c76c26478d44ebf6d56c96577 /include
parent146e0ac8ed6a287b77505ffdefa9fe77da93eee1 (diff)
downloadqtlocation-mapboxgl-64e2bcdf4395a1c65cd9faca81f98c4c5d974bd6.tar.gz
[core] Loading images to style optimization
This change enables attaching images to the style with batches and avoids massive re-allocations. Thus, it improves UI performance especially at start-up time.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/style/style.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/mbgl/style/style.hpp b/include/mbgl/style/style.hpp
index 83d6ad5bb4..2e47198930 100644
--- a/include/mbgl/style/style.hpp
+++ b/include/mbgl/style/style.hpp
@@ -1,8 +1,10 @@
#pragma once
-#include <mbgl/style/transition_options.hpp>
#include <mbgl/map/camera.hpp>
+#include <mbgl/style/transition_options.hpp>
#include <mbgl/util/geo.hpp>
+#include <mbgl/util/image.hpp>
+#include <mbgl/util/immutable.hpp>
#include <string>
#include <vector>
@@ -45,7 +47,7 @@ public:
void setLight(std::unique_ptr<Light>);
// Images
- const Image* getImage(const std::string&) const;
+ const PremultipliedImage* getImage(const std::string&) const;
void addImage(std::unique_ptr<Image>);
void removeImage(const std::string&);