diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-02-11 01:54:05 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-02-11 14:34:46 +0200 |
commit | 64e2bcdf4395a1c65cd9faca81f98c4c5d974bd6 (patch) | |
tree | 672f0cb62600314c76c26478d44ebf6d56c96577 /test/renderer/pattern_atlas.test.cpp | |
parent | 146e0ac8ed6a287b77505ffdefa9fe77da93eee1 (diff) | |
download | qtlocation-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 'test/renderer/pattern_atlas.test.cpp')
-rw-r--r-- | test/renderer/pattern_atlas.test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/renderer/pattern_atlas.test.cpp b/test/renderer/pattern_atlas.test.cpp index 350a64adb4..143ee928b5 100644 --- a/test/renderer/pattern_atlas.test.cpp +++ b/test/renderer/pattern_atlas.test.cpp @@ -21,8 +21,8 @@ TEST(PatternAtlas, Basic) { auto images = parseSprite(util::read_file("test/fixtures/annotations/emerald.png"), util::read_file("test/fixtures/annotations/emerald.json")); for (auto& image : images) { - if (image->getID() == "metro") { - ASSERT_TRUE(patternAtlas.addPattern(*image->baseImpl)); + if (image->id == "metro") { + ASSERT_TRUE(patternAtlas.addPattern(*image)); } } auto found = patternAtlas.getPattern("metro"); |