diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-03-18 14:29:46 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-03-18 20:14:15 +0200 |
commit | 3536de51244d8f7df3e21b5c5ae4971825ddeb4b (patch) | |
tree | f9a1fe249fda27ef4b7c83347e359ba8c5c9e0aa /include | |
parent | 14f19f0201a371dc6cf8ddee4b8f0c73bdc5be5d (diff) | |
download | qtlocation-mapboxgl-3536de51244d8f7df3e21b5c5ae4971825ddeb4b.tar.gz |
[core][tile|static mode] Introduce MapOptions::keepRenderData() flag
Render orchestrator stores the render data between render frames if this flag is set.
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/map/map_options.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/mbgl/map/map_options.hpp b/include/mbgl/map/map_options.hpp index fcb8c8f32f..7fd17c2dff 100644 --- a/include/mbgl/map/map_options.hpp +++ b/include/mbgl/map/map_options.hpp @@ -89,6 +89,28 @@ public: bool crossSourceCollisions() const; /** + * @brief Specify whether render data for layers, sources and images should be kept between renderStill() calls. + * + * This flag is ignored in Continuous mode. In Static mode and Tile mode, if this flag is set to false, all the data + * are created from scratch for every renderStill() call, which guaranties that no extra memory is used, however it + * might cause higher CPU load and network traffic. + * + * By default, it is set to true. + * + * @param keepRenderData true to enable, false to disable + * @return MapOptions for chaining options together. + */ + MapOptions& withKeepRenderData(bool keepRenderData); + + /** + * @brief Gets the previously set (or default) keepRenderData value. + * + * @return true if render data is kept between renderStill() calls, + * false otherwise. + */ + bool keepRenderData() const; + + /** * @brief Sets the orientation of the Map. By default, it is set to * Upwards. * |