diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-13 13:35:24 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-14 11:25:45 -0700 |
commit | 2a991c6846bc6742abd618ec750bd2f01a13b75e (patch) | |
tree | 0592f4b3ebc63aeed0aeefe5c576ae9a67bfccdc /src/mbgl/style/source.hpp | |
parent | e6ba10ceed93c3b565a80591d8def5f0e7d72aac (diff) | |
download | qtlocation-mapboxgl-2a991c6846bc6742abd618ec750bd2f01a13b75e.tar.gz |
[core] Virtualize Source::load
Diffstat (limited to 'src/mbgl/style/source.hpp')
-rw-r--r-- | src/mbgl/style/source.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mbgl/style/source.hpp b/src/mbgl/style/source.hpp index 51a9ba5c71..92ca808afb 100644 --- a/src/mbgl/style/source.hpp +++ b/src/mbgl/style/source.hpp @@ -48,7 +48,7 @@ public: ~Source() override; bool loaded = false; - void load(FileSource&); + virtual void load(FileSource&) = 0; bool isLoading() const; bool isLoaded() const; @@ -96,8 +96,13 @@ private: virtual std::unique_ptr<Tile> createTile(const OverscaledTileID&, const UpdateParameters&) = 0; protected: + void invalidateTiles(); + std::unique_ptr<const Tileset> tileset; std::unique_ptr<mapbox::geojsonvt::GeoJSONVT> geojsonvt; + std::unique_ptr<AsyncRequest> req; + + SourceObserver* observer = nullptr; private: // Stores the time when this source was most recently updated. @@ -106,10 +111,6 @@ private: std::map<OverscaledTileID, std::unique_ptr<Tile>> tiles; std::map<UnwrappedTileID, RenderTile> renderTiles; TileCache cache; - - std::unique_ptr<AsyncRequest> req; - - SourceObserver* observer = nullptr; }; } // namespace style |