[core] Introduce LayerRenderData. Source::update() accepts layer properties.

This commit is contained in:
Mikhail Pozdnyakov
2019-04-07 23:24:17 +03:00
parent 4b21560cf5
commit 7a7192516f
42 changed files with 166 additions and 132 deletions

View File

@@ -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();