summaryrefslogtreecommitdiff
path: root/src/mbgl/style/source.cpp
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2020-03-21 21:55:22 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2020-04-01 16:18:55 -0400
commit15f73a06f2048d4b5f0481d54a79f3f349187b11 (patch)
tree5166ba99751b11d6a994d0f3825332caf04ccd64 /src/mbgl/style/source.cpp
parent09f7bbcf7c07cc360c933ab1637662397b7db674 (diff)
downloadqtlocation-mapboxgl-15f73a06f2048d4b5f0481d54a79f3f349187b11.tar.gz
[core] Add setMaxOverscaleFactorForParentTiles
Diffstat (limited to 'src/mbgl/style/source.cpp')
-rw-r--r--src/mbgl/style/source.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mbgl/style/source.cpp b/src/mbgl/style/source.cpp
index 644a31dace..51a3c80089 100644
--- a/src/mbgl/style/source.cpp
+++ b/src/mbgl/style/source.cpp
@@ -43,6 +43,18 @@ optional<uint8_t> Source::getPrefetchZoomDelta() const noexcept {
return baseImpl->getPrefetchZoomDelta();
}
+void Source::setMaxOverscaleFactorForParentTiles(optional<uint8_t> overscaleFactor) noexcept {
+ if (getMaxOverscaleFactorForParentTiles() == overscaleFactor) return;
+ auto newImpl = createMutable();
+ newImpl->setMaxOverscaleFactorForParentTiles(std::move(overscaleFactor));
+ baseImpl = std::move(newImpl);
+ observer->onSourceChanged(*this);
+}
+
+optional<uint8_t> Source::getMaxOverscaleFactorForParentTiles() const noexcept {
+ return baseImpl->getMaxOverscaleFactorForParentTiles();
+}
+
void Source::dumpDebugLogs() const {
Log::Info(Event::General, "Source::id: %s", getID().c_str());
Log::Info(Event::General, "Source::loaded: %d", loaded);