summaryrefslogtreecommitdiff
path: root/test/tile
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-04-07 23:24:17 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-04-17 17:21:41 +0300
commit7a7192516ffa9b4ed5b94b60961a4dc74fcf6e64 (patch)
tree432a69b7a31b833304ccafcffe83b0cfe00d3c1f /test/tile
parent4b21560cf59877125ea0bdae1a2546ab06f1efb2 (diff)
downloadqtlocation-mapboxgl-7a7192516ffa9b4ed5b94b60961a4dc74fcf6e64.tar.gz
[core] Introduce `LayerRenderData`. Source::update() accepts layer properties.
Diffstat (limited to 'test/tile')
-rw-r--r--test/tile/custom_geometry_tile.test.cpp5
-rw-r--r--test/tile/geojson_tile.test.cpp10
2 files changed, 11 insertions, 4 deletions
diff --git a/test/tile/custom_geometry_tile.test.cpp b/test/tile/custom_geometry_tile.test.cpp
index dc6aaab1ac..7a627bad88 100644
--- a/test/tile/custom_geometry_tile.test.cpp
+++ b/test/tile/custom_geometry_tile.test.cpp
@@ -11,6 +11,7 @@
#include <mbgl/renderer/tile_parameters.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/layers/circle_layer.hpp>
+#include <mbgl/style/layers/circle_layer_impl.hpp>
#include <mbgl/annotation/annotation_manager.hpp>
#include <mbgl/renderer/image_manager.hpp>
#include <mbgl/text/glyph_manager.hpp>
@@ -120,7 +121,9 @@ TEST(CustomGeometryTile, InvokeTileChanged) {
ASSERT_NE(nullptr, tile.getBucket(*layer.baseImpl));
};
- tile.setLayers({{ layer.baseImpl }});
+ Immutable<LayerProperties> layerProperties = makeMutable<CircleLayerProperties>(staticImmutableCast<CircleLayer::Impl>(layer.baseImpl));
+ std::vector<Immutable<LayerProperties>> layers { layerProperties };
+ tile.setLayers(layers);
tile.setObserver(&observer);
tile.setTileData(features);
diff --git a/test/tile/geojson_tile.test.cpp b/test/tile/geojson_tile.test.cpp
index fb5f3ca6d7..772590efb2 100644
--- a/test/tile/geojson_tile.test.cpp
+++ b/test/tile/geojson_tile.test.cpp
@@ -10,6 +10,7 @@
#include <mbgl/renderer/tile_parameters.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/layers/circle_layer.hpp>
+#include <mbgl/style/layers/circle_layer_impl.hpp>
#include <mbgl/annotation/annotation_manager.hpp>
#include <mbgl/renderer/image_manager.hpp>
#include <mbgl/text/glyph_manager.hpp>
@@ -61,8 +62,9 @@ TEST(GeoJSONTile, Issue7648) {
// flickering.
ASSERT_NE(nullptr, tile.getBucket(*layer.baseImpl));
};
-
- tile.setLayers({{ layer.baseImpl }});
+ Immutable<LayerProperties> layerProperties = makeMutable<CircleLayerProperties>(staticImmutableCast<CircleLayer::Impl>(layer.baseImpl));
+ std::vector<Immutable<LayerProperties>> layers { layerProperties };
+ tile.setLayers(layers);
tile.setObserver(&observer);
while (!tile.isComplete()) {
@@ -87,7 +89,9 @@ TEST(GeoJSONTile, Issue9927) {
GeoJSONTile tile(OverscaledTileID(0, 0, 0), "source", test.tileParameters, features);
- tile.setLayers({{ layer.baseImpl }});
+ Immutable<LayerProperties> layerProperties = makeMutable<CircleLayerProperties>(staticImmutableCast<CircleLayer::Impl>(layer.baseImpl));
+ std::vector<Immutable<LayerProperties>> layers { layerProperties };
+ tile.setLayers(layers);
while (!tile.isComplete()) {
test.loop.runOnce();