summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-03-19 17:21:21 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-03-20 11:43:59 +0200
commit2ae96ad6879a00eba0b9115590f58e3eb3cbd019 (patch)
treed0363140001903fd200341441c573c3eee6b627f /include
parentbc45d65c58692cf0e21b4a932e4ba7bb674f12ba (diff)
downloadqtlocation-mapboxgl-2ae96ad6879a00eba0b9115590f58e3eb3cbd019.tar.gz
[core] Introduce Renderer::clearData() instead of keepRenderData map options
`Renderer::clearData()` is a better API than the removed `MapOptions::keepRenderData()`: - gives more flexibility to the client - similar to the existing `Renderer::reduceMemoryUse()` - the `MapOptions::keepRenderData()` API implementation could not handle the raise condition, which happened if the new still image request had come before all tiles from the previous requests were loaded. Co-authored-by: Dane Springmeyer <dane@mapbox.com>
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/map_options.hpp22
-rw-r--r--include/mbgl/renderer/renderer.hpp1
2 files changed, 1 insertions, 22 deletions
diff --git a/include/mbgl/map/map_options.hpp b/include/mbgl/map/map_options.hpp
index 7fd17c2dff..fcb8c8f32f 100644
--- a/include/mbgl/map/map_options.hpp
+++ b/include/mbgl/map/map_options.hpp
@@ -89,28 +89,6 @@ 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.
*
diff --git a/include/mbgl/renderer/renderer.hpp b/include/mbgl/renderer/renderer.hpp
index 91f2b6146c..1d71a016b6 100644
--- a/include/mbgl/renderer/renderer.hpp
+++ b/include/mbgl/renderer/renderer.hpp
@@ -63,6 +63,7 @@ public:
// Memory
void reduceMemoryUse();
+ void clearData();
private:
class Impl;