[core] Allow prefetching tiles for all source types

This commit is contained in:
Bruno de Oliveira Abinader
2017-11-23 13:36:15 +02:00
parent 637892cd6f
commit ed5438fc21

View File

@@ -93,14 +93,11 @@ 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);
// Make sure we're not reparsing overzoomed raster tiles.
if (type == SourceType::Raster) {
// Only attempt prefetching in continuous mode.
if (parameters.mode == MapMode::Continuous) {
tileZoom = idealZoom;
// FIXME: Prefetching is only enabled for raster
// tiles until we fix #7026.
// Request lower zoom level tiles (if configure to do so) in an attempt
// 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);