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

Commit

Permalink
[core] Fix sorting order for render tiles
Browse files Browse the repository at this point in the history
Sort by z order, so lower res tiles don't get rendered
over high res tiles.
  • Loading branch information
tmpsantos committed Jul 6, 2017
1 parent 86bb87f commit 05f548c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mbgl/renderer/render_style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ RenderData RenderStyle::getRenderData(MapDebugOptions debugOptions, float angle)

return std::tie(par.y, par.x) < std::tie(pbr.y, pbr.x);
});
} else {
std::sort(sortedTiles.begin(), sortedTiles.end(),
[](const auto& a, const auto& b) { return a.get().id < b.get().id; });
}

std::vector<std::reference_wrapper<RenderTile>> sortedTilesForInsertion;
Expand Down

0 comments on commit 05f548c

Please sign in to comment.