diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-05 12:31:26 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-07 11:04:19 -0700 |
commit | 5e53d0586fe97db1d49b4b63313c96efb7bf71f8 (patch) | |
tree | 179c94f21ba3f92cbb866ad4f3fb956e1e653039 /src/mbgl/style/source_impl.hpp | |
parent | 0e72fc4ec3a903bf6a91c3074e6a27275cd87cdd (diff) | |
download | qtlocation-mapboxgl-5e53d0586fe97db1d49b4b63313c96efb7bf71f8.tar.gz |
[core] Invalidate cached tiles of disabled sources on relayout
Diffstat (limited to 'src/mbgl/style/source_impl.hpp')
-rw-r--r-- | src/mbgl/style/source_impl.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mbgl/style/source_impl.hpp b/src/mbgl/style/source_impl.hpp index e8ba54b2b6..b4473cbc84 100644 --- a/src/mbgl/style/source_impl.hpp +++ b/src/mbgl/style/source_impl.hpp @@ -51,6 +51,9 @@ public: // Removes all tiles (by putting them into the cache). void removeTiles(); + // Remove all tiles and clear the cache. + void invalidateTiles(); + // Request that all loaded tiles re-run the layout operation on the existing source // data with fresh style information. void reloadTiles(); @@ -92,15 +95,14 @@ public: void detach(); protected: - void invalidateTiles(); - void removeStaleTiles(const std::set<OverscaledTileID>&); - Source& base; SourceObserver* observer = nullptr; std::map<OverscaledTileID, std::unique_ptr<Tile>> tiles; TileCache cache; private: + void removeStaleTiles(const std::set<OverscaledTileID>&); + // TileObserver implementation. void onTileChanged(Tile&) override; void onTileError(Tile&, std::exception_ptr) override; |