From 15f73a06f2048d4b5f0481d54a79f3f349187b11 Mon Sep 17 00:00:00 2001 From: Alexander Shalamov Date: Sat, 21 Mar 2020 21:55:22 +0200 Subject: [core] Add setMaxOverscaleFactorForParentTiles --- include/mbgl/style/source.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include') diff --git a/include/mbgl/style/source.hpp b/include/mbgl/style/source.hpp index 622c2e42ff..32b15bdf47 100644 --- a/include/mbgl/style/source.hpp +++ b/include/mbgl/style/source.hpp @@ -75,6 +75,20 @@ public: virtual void loadDescription(FileSource&) = 0; void setPrefetchZoomDelta(optional delta) noexcept; optional getPrefetchZoomDelta() const noexcept; + + // Sets a limit for how much a parent tile can be overscaled. + // + // When a set of tiles for a current zoom level is being rendered and some of the + // ideal tiles that cover the screen are not yet loaded, parent tile could be + // used instead. This might introduce unwanted rendering side-effects, especially + // for raster tiles that are overscaled multiple times. + // + // For example, an overscale factor of 3 would mean that on zoom level 3, the + // minimum zoom level of a parent tile that could be used in place of an ideal + // tile during rendering would be zoom 0. By default, no limit is set, so any + // parent tile may be used. + void setMaxOverscaleFactorForParentTiles(optional overscaleFactor) noexcept; + optional getMaxOverscaleFactorForParentTiles() const noexcept; void dumpDebugLogs() const; virtual bool supportsLayerType(const mbgl::style::LayerTypeInfo*) const = 0; -- cgit v1.2.1