Repository navigation
[ios] Fix for user puck jittering (and annotations lagging) - #12895
Conversation
|
Haven’t played with this yet, but I’m excited to see us finally looking again at Of course, it’s been deprecated in iOS 12... 🙃 |
| _glView.layer.opaque = _opaque; | ||
| _glView.delegate = self; | ||
|
|
||
| // `CAEAGLLayer.presentsWithTransaction` was introduced in iOS 9. |
There was a problem hiding this comment.
Since this project requires iOS 9, it feels unnecessary to include this comment (as it’s implied globally).
There was a problem hiding this comment.
Would it be more useful to keep track of backwards compatibility at the PR-level — as a project, perhaps? This comment hints at the larger change here, but doesn’t help a reader outside of the context of this PR.
There was a problem hiding this comment.
Agreed. Will discuss.
fabian-guerra
left a comment
There was a problem hiding this comment.
LGTM. Have you used instruments to measure the impact? Besides puck/annotations, which other components may be affected?
|
@fabian-guerra yes, Instruments showed no significant changes (if anything it looked like a slight improvement, but this was probably in the margin of error). In terms of other effects, I'd be most concerned about annotations and their callouts, but testing so far seems to show these are stable. |
friedbunny
left a comment
There was a problem hiding this comment.
I can’t really tell if this fixed the issue, but it also hasn’t regressed anything that I can find — running my view annotations benchmark gauntlet shows that performance is the same/within the margin of error.
…with the GL view.
…. This helps with general annotations.
f8c1f66 to
677b1e2
Compare
|
|
||
| * Added an `MGLSymbolStyleLayer.symbolZOrder` property for forcing point features in a symbol layer to be layered in the same order that they are specified in the layer’s associated source. ([#12783](https://github.com/mapbox/mapbox-gl-native/pull/12783)) | ||
| * Fixed a crash when a style layer `*-pattern` property evaluates to nil for a particular feature. ([#12896](https://github.com/mapbox/mapbox-gl-native/pull/12896)) | ||
| * Fixed an issue with annotations (including the user's location puck) and the GL map lagging relative to each other. ([#12895](https://github.com/mapbox/mapbox-gl-native/pull/12895)) |
There was a problem hiding this comment.
with annotations
Let’s specify “with view annotations”, as we have severals sorts of annotations.
user's location puck
We always call this the “user location annotation”.
This PR addresses #12740 and #5489.
Moving UIKit position updates prior to rendering and enabling
CAEAGLLayer.presentsWithTransaction(introduced in iOS 9) appears to have addressed both these issues.Running through Instruments show performance hasn't changed dramatically (perhaps even slightly improved), but I'd like to see some additional testing. My main concern is does the user puck behave the same as it used to (not "is it lagging")?
(I'd like to see some additional improvements to how core performs updates, but this is beyond the scope of this fix/PR.)