summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-07-12 17:32:19 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-07-12 19:38:23 +0300
commitff7fb5e46de275c8ceb4c2280edc020cff8b126e (patch)
tree20db9034e03b2cc61c0e70d908f538ad59718201
parent5b488225fb720ef607c13a33ff6509d92bb7de95 (diff)
downloadqtlocation-mapboxgl-ff7fb5e46de275c8ceb4c2280edc020cff8b126e.tar.gz
[core] RenderCustomGeometrySource should clear tiles after style update
Otherwise, the remaining stale tiles cannot be updated.
-rw-r--r--src/mbgl/renderer/sources/render_custom_geometry_source.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mbgl/renderer/sources/render_custom_geometry_source.cpp b/src/mbgl/renderer/sources/render_custom_geometry_source.cpp
index ee7b6e6f14..6b81658370 100644
--- a/src/mbgl/renderer/sources/render_custom_geometry_source.cpp
+++ b/src/mbgl/renderer/sources/render_custom_geometry_source.cpp
@@ -21,7 +21,10 @@ void RenderCustomGeometrySource::update(Immutable<style::Source::Impl> baseImpl_
const bool needsRendering,
const bool needsRelayout,
const TileParameters& parameters) {
- std::swap(baseImpl, baseImpl_);
+ if (baseImpl != baseImpl_) {
+ std::swap(baseImpl, baseImpl_);
+ tilePyramid.clearAll();
+ }
enabled = needsRendering;