diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-10-25 15:13:02 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-10-28 13:02:32 +0200 |
commit | 2f00ba72946618b6baac03ae395645cbeb83fe00 (patch) | |
tree | 24180f7feab0afc312f5bb237953a722661e857d /src | |
parent | aa36dc87fb5583425ab29b4a15407186c31c492f (diff) | |
download | qtlocation-mapboxgl-2f00ba72946618b6baac03ae395645cbeb83fe00.tar.gz |
[core] Do not make pending requests for already requested images.
so that processing for the corresponding tile does not suspend and
the rendering performance is not affected.
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/renderer/image_manager.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mbgl/renderer/image_manager.cpp b/src/mbgl/renderer/image_manager.cpp index 7b51fb9a2e..108376d190 100644 --- a/src/mbgl/renderer/image_manager.cpp +++ b/src/mbgl/renderer/image_manager.cpp @@ -197,16 +197,13 @@ void ImageManager::checkMissingAndNotify(ImageRequestor& requestor, const ImageR existingRequestors.emplace(requestorPtr); continue; } - // Unlike icons, pattern changes are not caught - // with style-diff meaning that the existing request - // could be from the previous style and we cannot - // coalesce requests for them. - if (dependency.second != ImageType::Pattern) { - continue; - } + // The request for this image has been already delivered + // to the client, so we do not treat it as pending. + existingRequestors.emplace(requestorPtr); + } else { + requestedImages[missingImage].emplace(requestorPtr); + requestor.addPendingRequest(missingImage); } - requestedImages[missingImage].emplace(requestorPtr); - requestor.addPendingRequest(missingImage); auto removePendingRequests = [this, missingImage] { auto existingRequest = requestedImages.find(missingImage); |