diff options
author | Ansis Brammanis <ansis@mapbox.com> | 2018-01-04 17:01:49 -0500 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2018-01-05 10:51:38 +0200 |
commit | aa158bb20c7a8b37b3a6def0ea246f0a952bb27a (patch) | |
tree | 0fec36a2045214bfbd29d9a1585dc31034471780 /src/mbgl | |
parent | 6fa57b7d48b6f0505166b8d3a940eaaf1ab5a18f (diff) | |
download | qtlocation-mapboxgl-aa158bb20c7a8b37b3a6def0ea246f0a952bb27a.tar.gz |
[core] fix #10833 loading overscaled tiles
This reverts a regression in ed5438fc21672e838947c06669dd44051ce24c81
which set `tileZoom = idealZoom` for all types of tiles.
The second change makes it so that panTiles get loaded only if they have
a lower *data zoom* (only if they cover a larger area).
Diffstat (limited to 'src/mbgl')
-rw-r--r-- | src/mbgl/renderer/tile_pyramid.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mbgl/renderer/tile_pyramid.cpp b/src/mbgl/renderer/tile_pyramid.cpp index 870d9050bc..6a711fb6d5 100644 --- a/src/mbgl/renderer/tile_pyramid.cpp +++ b/src/mbgl/renderer/tile_pyramid.cpp @@ -93,17 +93,21 @@ void TilePyramid::update(const std::vector<Immutable<style::Layer::Impl>>& layer if (overscaledZoom >= zoomRange.min) { int32_t idealZoom = std::min<int32_t>(zoomRange.max, overscaledZoom); - // Only attempt prefetching in continuous mode. - if (parameters.mode == MapMode::Continuous) { + + // Make sure we're not reparsing overzoomed raster tiles. + if (type == SourceType::Raster) { tileZoom = idealZoom; + } + // Only attempt prefetching in continuous mode. + if (parameters.mode == MapMode::Continuous) { // Request lower zoom level tiles (if configured to do so) in an attempt // to show something on the screen faster at the cost of a little of bandwidth. if (parameters.prefetchZoomDelta) { panZoom = std::max<int32_t>(tileZoom - parameters.prefetchZoomDelta, zoomRange.min); } - if (panZoom < tileZoom) { + if (panZoom < idealZoom) { panTiles = util::tileCover(parameters.transformState, panZoom); } } |