summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/image_manager.cpp
diff options
context:
space:
mode:
authorMolly Lloyd <molly@mapbox.com>2018-06-14 14:35:39 -0700
committerMolly Lloyd <mollymerp@users.noreply.github.com>2018-08-31 13:08:47 -0700
commit4a5dc37245d23805d13865f5ef9c5f26e539a9ca (patch)
treede77bfeff6f7afbe02210c9189bf72da59293083 /src/mbgl/renderer/image_manager.cpp
parentec62e321531b1a836074056e86de8e20018280fb (diff)
downloadqtlocation-mapboxgl-4a5dc37245d23805d13865f5ef9c5f26e539a9ca.tar.gz
[core] Implement CrossFadedDataDrivenProperty to add support for feature expressions in `*-pattern` properties
Diffstat (limited to 'src/mbgl/renderer/image_manager.cpp')
-rw-r--r--src/mbgl/renderer/image_manager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mbgl/renderer/image_manager.cpp b/src/mbgl/renderer/image_manager.cpp
index 2ef6be0c4f..fc1f5bb167 100644
--- a/src/mbgl/renderer/image_manager.cpp
+++ b/src/mbgl/renderer/image_manager.cpp
@@ -67,7 +67,7 @@ void ImageManager::getImages(ImageRequestor& requestor, ImageRequestPair&& pair)
bool hasAllDependencies = true;
if (!isLoaded()) {
for (const auto& dependency : pair.first) {
- if (images.find(dependency) == images.end()) {
+ if (images.find(dependency.first) == images.end()) {
hasAllDependencies = false;
}
}
@@ -84,16 +84,17 @@ void ImageManager::removeRequestor(ImageRequestor& requestor) {
}
void ImageManager::notify(ImageRequestor& requestor, const ImageRequestPair& pair) const {
- ImageMap response;
+ ImageMap iconMap;
+ ImageMap patternMap;
for (const auto& dependency : pair.first) {
- auto it = images.find(dependency);
+ auto it = images.find(dependency.first);
if (it != images.end()) {
- response.emplace(*it);
+ dependency.second == ImageType::Pattern ? patternMap.emplace(*it) : iconMap.emplace(*it);
}
}
- requestor.onImagesAvailable(response, pair.second);
+ requestor.onImagesAvailable(iconMap, patternMap, pair.second);
}
void ImageManager::dumpDebugLogs() const {