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

Commit

Permalink
[core] Allow prefetching tiles for all source types
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoabinader committed Jan 3, 2018
1 parent 637892c commit ed5438f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/mbgl/renderer/tile_pyramid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ed5438f

Please sign in to comment.