[core] Port "collision group" plumbing to gl-native.

[node] Hook up map-wide "crossSourceCollisions" option, defaulting to true.
[test] Pass "crossSourceCollisions" test option through test harness; enable cross-source-collisions tests on native.
This commit is contained in:
Chris Loer
2018-09-06 14:58:37 -07:00
committed by Chris Loer
parent 079ba0209e
commit d735d89835
17 changed files with 149 additions and 50 deletions

View File

@@ -61,7 +61,7 @@ Renderer::Impl::Impl(RendererBackend& backend_,
, sourceImpls(makeMutable<std::vector<Immutable<style::Source::Impl>>>())
, layerImpls(makeMutable<std::vector<Immutable<style::Layer::Impl>>>())
, renderLight(makeMutable<Light::Impl>())
, placement(std::make_unique<Placement>(TransformState{}, MapMode::Static)) {
, placement(std::make_unique<Placement>(TransformState{}, MapMode::Static, true)) {
glyphManager->setObserver(this);
}
@@ -398,7 +398,7 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
if (!placement->stillRecent(parameters.timePoint)) {
placementChanged = true;
auto newPlacement = std::make_unique<Placement>(parameters.state, parameters.mapMode);
auto newPlacement = std::make_unique<Placement>(parameters.state, parameters.mapMode, updateParameters.crossSourceCollisions);
std::set<std::string> usedSymbolLayers;
for (auto it = order.rbegin(); it != order.rend(); ++it) {
if (it->layer.is<RenderSymbolLayer>()) {