[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>
This commit is contained in:
@@ -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() {}
|
||||
|
||||
Reference in New Issue
Block a user