[core] Prefetch low resolution tiles
This commit is contained in:
committed by
Thiago Marcos P. Santos
parent
2876db72f2
commit
407fbc70b1
@@ -156,6 +156,15 @@ public:
|
||||
|
||||
AnnotationIDs queryPointAnnotations(const ScreenBox&);
|
||||
|
||||
// Tile prefetching
|
||||
//
|
||||
// When loading a map, if `PrefetchZoomDelta` is set to any number greater than 0, the map will
|
||||
// first request a tile for `zoom = getZoom() - delta` in a attempt to display a full map at
|
||||
// lower resolution as quick as possible. It will get clamped at the tile source minimum zoom.
|
||||
// The default `delta` is 4.
|
||||
void setPrefetchZoomDelta(uint8_t delta);
|
||||
uint8_t getPrefetchZoomDelta() const;
|
||||
|
||||
// Memory
|
||||
void onLowMemory();
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ constexpr double MAX_ZOOM = 25.5;
|
||||
constexpr float MIN_ZOOM_F = MIN_ZOOM;
|
||||
constexpr float MAX_ZOOM_F = MAX_ZOOM;
|
||||
|
||||
constexpr uint8_t DEFAULT_PREFETCH_ZOOM_DELTA = 4;
|
||||
|
||||
constexpr uint64_t DEFAULT_MAX_CACHE_SIZE = 50 * 1024 * 1024;
|
||||
|
||||
constexpr Duration DEFAULT_TRANSITION_DURATION = Milliseconds(300);
|
||||
|
||||
Reference in New Issue
Block a user