summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-31 13:53:48 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-06-05 19:38:08 -0700
commit9dfc2d924d440560adb2db13c758b2c5b3b7dd47 (patch)
tree8d1868b5b011676fd0a7d260e0c3560cd36db6b9 /test
parent97eb62fe7cc10fd882f6e361c461900687361460 (diff)
downloadqtlocation-mapboxgl-9dfc2d924d440560adb2db13c758b2c5b3b7dd47.tar.gz
[core] Collection-level immutability
Introduce a second level of immutability, over each of the collections held by a style: sources, images, and layers. Tracking immutability at this level allows us to short-circuit significant portions of the RenderStyle update logic via a simple equality check, greatly improving performance.
Diffstat (limited to 'test')
-rw-r--r--test/sprite/sprite_atlas.test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sprite/sprite_atlas.test.cpp b/test/sprite/sprite_atlas.test.cpp
index 3226f19c1b..78a5862475 100644
--- a/test/sprite/sprite_atlas.test.cpp
+++ b/test/sprite/sprite_atlas.test.cpp
@@ -23,7 +23,7 @@ TEST(SpriteAtlas, Basic) {
auto images = parseSprite(util::read_file("test/fixtures/annotations/emerald.png"),
util::read_file("test/fixtures/annotations/emerald.json"));
for (auto& image : images) {
- atlas.addImage(image->impl);
+ atlas.addImage(image->baseImpl);
}
auto metro = *atlas.getIcon("metro");
@@ -63,7 +63,7 @@ TEST(SpriteAtlas, Size) {
auto images = parseSprite(util::read_file("test/fixtures/annotations/emerald.png"),
util::read_file("test/fixtures/annotations/emerald.json"));
for (auto& image : images) {
- atlas.addImage(image->impl);
+ atlas.addImage(image->baseImpl);
}
auto metro = *atlas.getIcon("metro");