Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Introduce map mode specific Placement implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
pozdnyakov committed Mar 23, 2020
1 parent 7b0fdf8 commit 610cce7
Show file tree
Hide file tree
Showing 3 changed files with 275 additions and 184 deletions.
5 changes: 2 additions & 3 deletions src/mbgl/renderer/render_orchestrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,8 @@ std::unique_ptr<RenderTree> RenderOrchestrator::createRenderTree(
renderTreeParameters->placementChanged = !placementController.placementIsRecent(
updateParameters->timePoint, updateParameters->transformState.getZoom(), placementUpdatePeriodOverride);
symbolBucketsChanged |= renderTreeParameters->placementChanged;

if (renderTreeParameters->placementChanged) {
Mutable<Placement> placement = makeMutable<Placement>(updateParameters, placementController.getPlacement());
Mutable<Placement> placement = Placement::create(updateParameters, placementController.getPlacement());
placement->placeLayers(layersNeedPlacement);
placementController.setPlacement(std::move(placement));
crossTileSymbolIndex.pruneUnusedLayers(usedSymbolLayers);
Expand All @@ -425,7 +424,7 @@ std::unique_ptr<RenderTree> RenderOrchestrator::createRenderTree(
} else {
renderTreeParameters->placementChanged = symbolBucketsChanged = !layersNeedPlacement.empty();
if (renderTreeParameters->placementChanged) {
Mutable<Placement> placement = makeMutable<Placement>(updateParameters);
Mutable<Placement> placement = Placement::create(updateParameters);
placement->placeLayers(layersNeedPlacement);
placementController.setPlacement(std::move(placement));
}
Expand Down
Loading

0 comments on commit 610cce7

Please sign in to comment.