From bdbb1366123b4e2cbdba93dcbb6707924229cd83 Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Mon, 28 Oct 2019 12:23:50 +0200 Subject: [ios][android][core] Added change log entries and more code comments --- platform/android/CHANGELOG.md | 3 +++ platform/ios/CHANGELOG.md | 3 ++- src/mbgl/renderer/image_manager.cpp | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/android/CHANGELOG.md b/platform/android/CHANGELOG.md index cc572194e8..7722736100 100644 --- a/platform/android/CHANGELOG.md +++ b/platform/android/CHANGELOG.md @@ -4,6 +4,9 @@ Mapbox welcomes participation and contributions from everyone. If you'd like to ## master +### Bug fixes + - Fixed the rendering bug caused by redundant pending requests for already requested images [#15864](https://github.com/mapbox/mapbox-gl-native/pull/15864) + ### Performance improvements - Enable incremental vacuum for the offline database in order to make data removal requests faster and to avoid the excessive disk space usage (creating a backup file on VACUUM call) [#15837](https://github.com/mapbox/mapbox-gl-native/pull/15837) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 0c776b0944..98761737f7 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -6,7 +6,8 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT ### Other changes -* Coalesce requests to the client for the same missing image ([#15778](https://github.com/mapbox/mapbox-gl-native/pull/15778)) +### Bug fixes +* Fixed the rendering bug caused by redundant pending requests for already requested images [#15864](https://github.com/mapbox/mapbox-gl-native/pull/15864) * Enable incremental vacuum for the offline database in order to make data removal requests faster and to avoid the excessive disk space usage (creating a backup file on VACUUM call). ([#15837](https://github.com/mapbox/mapbox-gl-native/pull/15837)) ## 5.5.0 diff --git a/src/mbgl/renderer/image_manager.cpp b/src/mbgl/renderer/image_manager.cpp index 108376d190..2ea753d8aa 100644 --- a/src/mbgl/renderer/image_manager.cpp +++ b/src/mbgl/renderer/image_manager.cpp @@ -190,6 +190,7 @@ void ImageManager::checkMissingAndNotify(ImageRequestor& requestor, const ImageR auto existingRequestorsIt = requestedImages.find(missingImage); if (existingRequestorsIt != requestedImages.end()) { // Already asked client about this image. std::set& existingRequestors = existingRequestorsIt->second; + // existingRequestors is empty if all the previous requestors are deleted. if (!existingRequestors.empty() && (*existingRequestors.begin()) ->hasPendingRequest(missingImage)) { // Still waiting for the client response for this image. @@ -200,6 +201,8 @@ void ImageManager::checkMissingAndNotify(ImageRequestor& requestor, const ImageR // The request for this image has been already delivered // to the client, so we do not treat it as pending. existingRequestors.emplace(requestorPtr); + // TODO: we could `continue;` here, but we need to call `observer->onStyleImageMissing`, + // so that rendering is re-launched from the handler at Map::Impl. } else { requestedImages[missingImage].emplace(requestorPtr); requestor.addPendingRequest(missingImage); -- cgit v1.2.1