summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-08-23 13:59:39 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-08-23 14:06:43 -0700
commit8587a81e4805dd191cff0ee0e502c3c1e80e8cd9 (patch)
treea5c688c2cecea9ebc1260d5c705be178bae1a51f
parentf2c9f2bf3695fc30579a40978ebda9d87e4b4bcd (diff)
downloadqtlocation-mapboxgl-upstream/rv-cd8eb13.tar.gz
Revert "[core] Ensure image dependencies in GeometryTileWorker::onImagesAvailable"upstream/rv-cd8eb13
This reverts commit cd8eb13ba2d8b65f6cac12a36e0586abc56fcb9f. Disable/enable tests as appropriate to compensate.
-rw-r--r--platform/node/test/ignores.json1
-rw-r--r--src/mbgl/tile/geometry_tile_worker.cpp7
-rw-r--r--test/api/recycle_map.cpp75
3 files changed, 39 insertions, 44 deletions
diff --git a/platform/node/test/ignores.json b/platform/node/test/ignores.json
index 4d4e0edbe4..5e4ba8697d 100644
--- a/platform/node/test/ignores.json
+++ b/platform/node/test/ignores.json
@@ -48,7 +48,6 @@
"render-tests/regressions/mapbox-gl-js#4551": "skip - https://github.com/mapbox/mapbox-gl-native/issues/1350",
"render-tests/regressions/mapbox-gl-js#4573": "skip - https://github.com/mapbox/mapbox-gl-native/issues/1350",
"render-tests/regressions/mapbox-gl-native#7357": "https://github.com/mapbox/mapbox-gl-native/issues/7357",
- "render-tests/regressions/mapbox-gl-native#9792": "skip - https://github.com/mapbox/mapbox-gl-native/issues/9792",
"render-tests/runtime-styling/paint-property-fill-flat-to-extrude": "skip - https://github.com/mapbox/mapbox-gl-native/issues/6745",
"render-tests/runtime-styling/set-style-paint-property-fill-flat-to-extrude": "skip - needs issue",
"render-tests/runtime-styling/source-add-geojson-inline": "skip - needs issue",
diff --git a/src/mbgl/tile/geometry_tile_worker.cpp b/src/mbgl/tile/geometry_tile_worker.cpp
index add1ea343c..c622d82e31 100644
--- a/src/mbgl/tile/geometry_tile_worker.cpp
+++ b/src/mbgl/tile/geometry_tile_worker.cpp
@@ -218,12 +218,7 @@ void GeometryTileWorker::onGlyphsAvailable(GlyphMap newGlyphMap) {
void GeometryTileWorker::onImagesAvailable(ImageMap newImageMap) {
imageMap = std::move(newImageMap);
- for (const auto& pair : imageMap) {
- auto it = pendingImageDependencies.find(pair.first);
- if (it != pendingImageDependencies.end()) {
- pendingImageDependencies.erase(it);
- }
- }
+ pendingImageDependencies.clear();
symbolDependenciesChanged();
}
diff --git a/test/api/recycle_map.cpp b/test/api/recycle_map.cpp
index 8cd622fe79..61d4265914 100644
--- a/test/api/recycle_map.cpp
+++ b/test/api/recycle_map.cpp
@@ -19,40 +19,41 @@
using namespace mbgl;
using namespace mbgl::style;
-
-TEST(API, RecycleMapUpdateImages) {
- util::RunLoop loop;
-
- StubFileSource fileSource;
- ThreadPool threadPool(4);
- float pixelRatio { 1 };
-
- HeadlessFrontend frontend { pixelRatio, fileSource, threadPool };
- auto map = std::make_unique<Map>(frontend, MapObserver::nullObserver(), frontend.getSize(),
- pixelRatio, fileSource, threadPool, MapMode::Still);
-
- EXPECT_TRUE(map);
-
- auto loadStyle = [&](auto markerName, auto markerPath) {
- auto source = std::make_unique<GeoJSONSource>("geometry");
- source->setGeoJSON({ Point<double> { 0, 0 } });
-
- auto layer = std::make_unique<SymbolLayer>("geometry", "geometry");
- layer->setIconImage({ markerName });
-
- map->getStyle().loadJSON(util::read_file("test/fixtures/api/empty.json"));
- map->getStyle().addSource(std::move(source));
- map->getStyle().addLayer(std::move(layer));
- map->getStyle().addImage(std::make_unique<style::Image>(markerName, decodeImage(util::read_file(markerPath)), 1.0));
- };
-
- // default marker
-
- loadStyle("default_marker", "test/fixtures/sprites/default_marker.png");
- test::checkImage("test/fixtures/recycle_map/default_marker", frontend.render(*map), 0.0006, 0.1);
-
- // flipped marker
-
- loadStyle("flipped_marker", "test/fixtures/sprites/flipped_marker.png");
- test::checkImage("test/fixtures/recycle_map/flipped_marker", frontend.render(*map), 0.0006, 0.1);
-}
+// Wanted to use DISABLED_TEST here but clang-tidy can't cope with it.
+
+//TEST(API, RecycleMapUpdateImages) {
+// util::RunLoop loop;
+//
+// StubFileSource fileSource;
+// ThreadPool threadPool(4);
+// float pixelRatio { 1 };
+//
+// HeadlessFrontend frontend { pixelRatio, fileSource, threadPool };
+// auto map = std::make_unique<Map>(frontend, MapObserver::nullObserver(), frontend.getSize(),
+// pixelRatio, fileSource, threadPool, MapMode::Still);
+//
+// EXPECT_TRUE(map);
+//
+// auto loadStyle = [&](auto markerName, auto markerPath) {
+// auto source = std::make_unique<GeoJSONSource>("geometry");
+// source->setGeoJSON({ Point<double> { 0, 0 } });
+//
+// auto layer = std::make_unique<SymbolLayer>("geometry", "geometry");
+// layer->setIconImage({ markerName });
+//
+// map->getStyle().loadJSON(util::read_file("test/fixtures/api/empty.json"));
+// map->getStyle().addSource(std::move(source));
+// map->getStyle().addLayer(std::move(layer));
+// map->getStyle().addImage(std::make_unique<style::Image>(markerName, decodeImage(util::read_file(markerPath)), 1.0));
+// };
+//
+// // default marker
+//
+// loadStyle("default_marker", "test/fixtures/sprites/default_marker.png");
+// test::checkImage("test/fixtures/recycle_map/default_marker", frontend.render(*map), 0.0006, 0.1);
+//
+// // flipped marker
+//
+// loadStyle("flipped_marker", "test/fixtures/sprites/flipped_marker.png");
+// test::checkImage("test/fixtures/recycle_map/flipped_marker", frontend.render(*map), 0.0006, 0.1);
+//}