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

@@ -152,6 +152,11 @@ public:
std::vector<uint32_t> getAnnotationsInBounds(const LatLngBounds&);
LatLngBounds getBoundsForAnnotations(const std::vector<uint32_t>&);
// Memory
void setSourceTileCacheSize(size_t);
size_t getSourceTileCacheSize() const { return sourceCacheSize; }
void onLowMemory();
// Debug
void setDebug(bool value);
void toggleDebug();
@@ -196,6 +201,8 @@ private:
void updateAnnotationTiles(const std::vector<TileID>&);
size_t sourceCacheSize;
enum class Mode : uint8_t {
None, // we're not doing any processing
Continuous, // continually updating map