summaryrefslogtreecommitdiff
path: root/test/map
diff options
context:
space:
mode:
authorMikko Pulkki <mikko.pulkki@mapbox.com>2019-10-15 12:03:04 +0300
committerMikko Pulkki <55925868+mpulkki-mapbox@users.noreply.github.com>2019-10-30 14:32:27 +0200
commita7a7e8cbe29e672d020db1d150e887f33d584a2d (patch)
tree1c686fb6b2a91e0ef70d62b129545c1077e15a7f /test/map
parentfb062bb23e66af3d5a889b767aae380884b259e5 (diff)
downloadqtlocation-mapboxgl-a7a7e8cbe29e672d020db1d150e887f33d584a2d.tar.gz
[render-test] Implement gfx probe for tracking gpu resources
Diffstat (limited to 'test/map')
-rw-r--r--test/map/map.test.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index 6f4b14a681..0eebc93f32 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -259,10 +259,7 @@ TEST(Map, Offline) {
test.map.getStyle().loadURL(prefix + "style.json");
- test::checkImage("test/fixtures/map/offline",
- test.frontend.render(test.map),
- 0.0015,
- 0.1);
+ test::checkImage("test/fixtures/map/offline", test.frontend.render(test.map).image, 0.0015, 0.1);
NetworkStatus::Set(NetworkStatus::Status::Online);
}
@@ -608,7 +605,7 @@ TEST(Map, AddLayer) {
layer->setBackgroundColor({ { 1, 0, 0, 1 } });
test.map.getStyle().addLayer(std::move(layer));
- test::checkImage("test/fixtures/map/add_layer", test.frontend.render(test.map));
+ test::checkImage("test/fixtures/map/add_layer", test.frontend.render(test.map).image);
}
TEST(Map, WithoutVAOExtension) {
@@ -623,7 +620,7 @@ TEST(Map, WithoutVAOExtension) {
test.map.getStyle().loadJSON(util::read_file("test/fixtures/api/water.json"));
- test::checkImage("test/fixtures/map/no_vao", test.frontend.render(test.map), 0.002);
+ test::checkImage("test/fixtures/map/no_vao", test.frontend.render(test.map).image, 0.002);
}
TEST(Map, RemoveLayer) {
@@ -636,7 +633,7 @@ TEST(Map, RemoveLayer) {
test.map.getStyle().addLayer(std::move(layer));
test.map.getStyle().removeLayer("background");
- test::checkImage("test/fixtures/map/remove_layer", test.frontend.render(test.map));
+ test::checkImage("test/fixtures/map/remove_layer", test.frontend.render(test.map).image);
}
TEST(Map, DisabledSources) {
@@ -694,9 +691,9 @@ TEST(Map, DisabledSources) {
}
)STYLE");
- test::checkImage("test/fixtures/map/disabled_layers/first", test.frontend.render(test.map));
+ test::checkImage("test/fixtures/map/disabled_layers/first", test.frontend.render(test.map).image);
test.map.jumpTo(CameraOptions().withZoom(0.5));
- test::checkImage("test/fixtures/map/disabled_layers/second", test.frontend.render(test.map));
+ test::checkImage("test/fixtures/map/disabled_layers/second", test.frontend.render(test.map).image);
}
TEST(Map, DontLoadUnneededTiles) {
@@ -815,10 +812,7 @@ TEST(Map, NoContentTiles) {
}]
})STYLE");
- test::checkImage("test/fixtures/map/nocontent",
- test.frontend.render(test.map),
- 0.0015,
- 0.1);
+ test::checkImage("test/fixtures/map/nocontent", test.frontend.render(test.map).image, 0.0015, 0.1);
}
// https://github.com/mapbox/mapbox-gl-native/issues/12432