fixes #1157, #1255: cache parsed tiles in memory

This commit is contained in:
Justin R. Miller
2015-04-16 01:15:41 -07:00
parent c574acd64d
commit 190709c6b1
9 changed files with 191 additions and 7 deletions

View File

@@ -3,6 +3,7 @@
#include <mbgl/map/tile_id.hpp>
#include <mbgl/map/tile_data.hpp>
#include <mbgl/map/tile_cache.hpp>
#include <mbgl/style/types.hpp>
#include <mbgl/util/noncopyable.hpp>
@@ -72,6 +73,9 @@ public:
std::forward_list<Tile *> getLoadedTiles() const;
void setCacheSize(size_t);
void onLowMemory();
SourceInfo info;
bool enabled;
@@ -96,6 +100,7 @@ private:
std::map<TileID, std::unique_ptr<Tile>> tiles;
std::map<TileID, std::weak_ptr<TileData>> tile_data;
TileCache cache;
};
}