This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Clear out GeometryTileWorker::layers during redoLayout#7648
Closed
kkaefer wants to merge 3 commits into
Closed
Conversation
Discard prior symbol buckets only when new symbol buckets became available, in order to eliminate flickering when tiles are refreshed.
This reduces state and simplifies the test added in the prior commit.
This avoids a corner case where redoLayout was called with a new set of data, but the layer objects were moved out during the previous call to redoLayout. When setting new data, we call setData() first, then setLayout(). The setData() call doesn't immediately process the tiles, since it will still be lacking layer data.
|
@kkaefer, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh to be potential reviewers. |
kkaefer
commented
Jan 9, 2017
| BucketParameters parameters { id, obsolete, *featureIndex, mode }; | ||
|
|
||
| std::vector<std::vector<std::unique_ptr<Layer>>> groups = groupByLayout(std::move(*layers)); | ||
| layers = nullopt; |
kkaefer
commented
Jan 9, 2017
|
|
||
| void GeometryTileWorker::attemptPlacement() { | ||
| if (!data || !layers || !placementConfig) { | ||
| if (!placementConfig) { |
Member
Author
There was a problem hiding this comment.
We don't need access to data and layers anymore, since all of that is encoded in the SymbolLayout objects now. This change is necessary, since disengaging the optional will make this check fail when it is part of redoLayout() (called at the very end), meaning that there won't be any symbols until placement is triggered again.
Contributor
There was a problem hiding this comment.
I have a feeling at least one of these guards was needed to ensure that the body of attemptPlacement does not run if setPlacementConfig is called before setData and setLayers.
Contributor
|
Alternate fix added to #7616. |
Contributor
|
Merged alternate fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This avoids a corner case where redoLayout was called with a new set of data, but the layer objects were moved out during the previous call to redoLayout. When setting new data, we call setData() first, then
setLayout(). ThesetData()call doesn't immediately process the tiles, since it will still be lacking layer data.