diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-07-06 15:49:22 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-07-07 14:28:52 +0300 |
commit | e962b79b0f434ab80556cede425bdc1daf7730b2 (patch) | |
tree | 6b63f5fe7bfa959ae7618ceed216eeb22656dd66 /src | |
parent | 69c8f602de9ab087dd841dfabf33a72d46672673 (diff) | |
download | qtlocation-mapboxgl-e962b79b0f434ab80556cede425bdc1daf7730b2.tar.gz |
[core] Fix sorting order for render tiles
Sort by z order, so lower res tiles don't get rendered
over high res tiles.
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/renderer/render_style.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mbgl/renderer/render_style.cpp b/src/mbgl/renderer/render_style.cpp index aacabe563d..25dbba76f6 100644 --- a/src/mbgl/renderer/render_style.cpp +++ b/src/mbgl/renderer/render_style.cpp @@ -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; |