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 /test | |
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 'test')
-rw-r--r-- | test/renderer/image_manager.test.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/test/renderer/image_manager.test.cpp b/test/renderer/image_manager.test.cpp index 20c0a3a7f3..d1d0a83c44 100644 --- a/test/renderer/image_manager.test.cpp +++ b/test/renderer/image_manager.test.cpp @@ -187,20 +187,14 @@ TEST(ImageManager, OnStyleImageMissingBeforeSpriteLoaded) { EXPECT_EQ(observer.count, 1); ASSERT_TRUE(notified); - // Repeated request of the same image shall not result another - // `ImageManagerObserver.onStyleImageMissing()` call. - imageManager.getImages(requestor, std::make_pair(dependencies, ++imageCorrelationID)); - runLoop.runOnce(); - - EXPECT_EQ(observer.count, 1); - // Request for updated dependencies must be dispatched to the // observer. dependencies.emplace("post", ImageType::Icon); imageManager.getImages(requestor, std::make_pair(dependencies, ++imageCorrelationID)); - runLoop.runOnce(); + ASSERT_TRUE(requestor.hasPendingRequests()); - EXPECT_EQ(observer.count, 2); + runLoop.runOnce(); + ASSERT_FALSE(requestor.hasPendingRequests()); // Another requestor shall not have pending requests for already obtained images. StubImageRequestor anotherRequestor(imageManager); |