diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-03-21 21:55:22 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-04-01 16:18:55 -0400 |
commit | 15f73a06f2048d4b5f0481d54a79f3f349187b11 (patch) | |
tree | 5166ba99751b11d6a994d0f3825332caf04ccd64 /src/mbgl/style/source.cpp | |
parent | 09f7bbcf7c07cc360c933ab1637662397b7db674 (diff) | |
download | qtlocation-mapboxgl-15f73a06f2048d4b5f0481d54a79f3f349187b11.tar.gz |
[core] Add setMaxOverscaleFactorForParentTiles
Diffstat (limited to 'src/mbgl/style/source.cpp')
-rw-r--r-- | src/mbgl/style/source.cpp | 12 |
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); |