summaryrefslogtreecommitdiff
path: root/render-test
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 /render-test
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 'render-test')
-rw-r--r--render-test/runner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/render-test/runner.cpp b/render-test/runner.cpp
index 4fc68d0a1a..de43e5ddd8 100644
--- a/render-test/runner.cpp
+++ b/render-test/runner.cpp
@@ -641,6 +641,7 @@ TestOperations getAfterOperations(const Manifest& manifest) {
}
void resetContext(const TestMetadata& metadata, TestContext& ctx) {
+ ctx.getFrontend().getRenderer()->clearData();
ctx.getFrontend().setSize(metadata.size);
auto& map = ctx.getMap();
map.setSize(metadata.size);
@@ -683,8 +684,7 @@ TestRunner::Impl::Impl(const TestMetadata& metadata, const mbgl::ResourceOptions
.withMapMode(metadata.mapMode)
.withSize(metadata.size)
.withPixelRatio(metadata.pixelRatio)
- .withCrossSourceCollisions(metadata.crossSourceCollisions)
- .withKeepRenderData(metadata.mapMode != MapMode::Tile),
+ .withCrossSourceCollisions(metadata.crossSourceCollisions),
resourceOptions) {}
TestRunner::Impl::~Impl() {}