Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Add Renderer::clearData() instead of keepRenderData map options #16323

Merged
merged 4 commits into from
Mar 20, 2020

Conversation

pozdnyakov
Copy link
Contributor

@pozdnyakov pozdnyakov commented Mar 19, 2020

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 race 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

Fixes https://github.com/mapbox/mapbox-gl-native-team/issues/215

…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>
@pozdnyakov pozdnyakov self-assigned this Mar 19, 2020
@pozdnyakov pozdnyakov requested review from alexshalamov, tmpsantos and springmeyer and removed request for alexshalamov March 19, 2020 15:41
CHANGELOG.md Outdated Show resolved Hide resolved
@@ -2,8 +2,8 @@
"network": [
[
"probeNetwork - default - end",
12,
340753
8,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious: why did these change with this PR? I would have though that this PR would not change any results and it would only fix a rare race (that I presume was not previously impacting the baselines).

test/map/map.test.cpp Outdated Show resolved Hide resolved
@springmeyer
Copy link
Contributor

Tested this fully downstream and everything is working well 👍

@pozdnyakov pozdnyakov merged commit 8bf841a into master Mar 20, 2020
@pozdnyakov pozdnyakov deleted the mikhail_renderer_clear_data branch March 20, 2020 09:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants