diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-05-03 14:31:11 +0300 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-05-21 06:49:17 -0700 |
commit | 0344ce36c483dbbcf770ac7f2615a233b22c4452 (patch) | |
tree | f85a8582d515670791ea3007d6c353e9848d326c | |
parent | c2f974f2a57348213cc02d2472f9c54ba86e6010 (diff) | |
download | qtlocation-mapboxgl-0344ce36c483dbbcf770ac7f2615a233b22c4452.tar.gz |
[core] Define max cache size for ImageManager
-rw-r--r-- | include/mbgl/util/constants.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/util/constants.hpp b/include/mbgl/util/constants.hpp index f7799a953f..97a87eda67 100644 --- a/include/mbgl/util/constants.hpp +++ b/include/mbgl/util/constants.hpp @@ -48,6 +48,10 @@ constexpr uint8_t DEFAULT_PREFETCH_ZOOM_DELTA = 4; constexpr uint64_t DEFAULT_MAX_CACHE_SIZE = 50 * 1024 * 1024; +// Default ImageManager's cache size for images added via onStyleImageMissing API. +// Average sprite size with 1.0 pixel ratio is ~2kB, 8kB for pixel ratio of 2.0. +constexpr std::size_t DEFAULT_ON_DEMAND_IMAGES_CACHE_SIZE = 100 * 8192; + constexpr Duration DEFAULT_TRANSITION_DURATION = Milliseconds(300); constexpr Seconds CLOCK_SKEW_RETRY_TIMEOUT { 30 }; |