-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Relayout after recalculating to ensure visibility changes are handled correctly #7242
Conversation
@ivovandongen, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh, @1ec5 and @incanus to be potential reviewers. |
@kkaefer @brunoabinader this pr fixes the visibility issue without revering the optimisation in 9127299 A review would be welcome so we can cherry pick it into the android 4.2.0 release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ivovandongen test case looks sounds. This actually fixed the same issue I had with the runtime style example in our Qt demos. Awesome!
This also needs to be cherry-picked to the iOS release branch. /cc @boundsj |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make the test case in mapbox-gl-test-suite instead, so both gl-js and gl-native benefit?
9a91366
to
00cbcce
Compare
00cbcce
to
424c05b
Compare
@jfirebaugh I fixed the unit test. Not sure how to implement the same thing in a regression test: mapbox/mapbox-gl-test-suite#188 |
424c05b
to
f631efd
Compare
f631efd
to
320e1db
Compare
This ensures that a "wait" command will always fully flush pending update flags. This was not the case with the prior conditional map.loaded() logic.
Previously, for viewport sizes less than 512 pixels in either direction, the computed size was 0.
Style::relayout uses source.baseImpl->loaded, a flag which is updated by Style::recalculate. So recalculate first, then relayout.
320e1db
to
904f1a3
Compare
This ports #7242 commits/2d323211af54499d5c822b8e45d7415bf92112f0 to the iOS 3.4.0 release branch.
This ports #7242 commits/2d323211af54499d5c822b8e45d7415bf92112f0 to the iOS 3.4.0 release branch.
Fixes #7241
Fixes #7225
Fixes #6758
Re-ordering
relayout()
afterrecalculate()
ensures that sources are enabled before checking if tiles need to be reloaded on them.